# Error with importing module

**URL:** <https://discourse.slicer.org/t/error-with-importing-module/30979>\
**Category:** Community\
**Created:** [August 4, 2023, 4:30pm UTC](https://discourse.slicer.org/t/error-with-importing-module/30979 "2023-08-04T16:30:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slicer365](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer365/32/67549_2.png) [@slicer365](https://discourse.slicer.org/u/slicer365)\
**Post date:** [August 4, 2023, 4:30pm UTC](https://discourse.slicer.org/t/error-with-importing-module/30979/1 "2023-08-04T16:30:53Z")

</div>

I have a custom module that encapsulates some functions. I can import it into the python script normally in vscode. Now I have made the script into a slicer module. When I put the pyd file in the same directory as the script, but import failed.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/9/79d68f50b6a6cf614f78e5aeddb974c1097d2dea.png)

it means can’t find the file

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d7ff690f2e4cb5a92dc7f606a62e44c7819c5457.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/4/8449db3d561cf0d4b1b968e6dbadea9087fa009e.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 4, 2023, 7:33pm UTC](https://discourse.slicer.org/t/error-with-importing-module/30979/2 "2023-08-04T19:33:44Z")

</div>

Python-3.8 toughened security in Windows, so it is not enough to have DLLs in the path. See more information for example here: [python module dlls - Stack Overflow](https://stackoverflow.com/a/64303856)
