1

I'm having issues when importing a Python API I'm building.

I'm using Swig to wrap C code, then compile it into a pyd library. Everything goes well during the build and I get my pyd library _libprojectApiPy38_64.pyd with no apparent issue. The issue comes at runtime, when I try importing my library I get the following error, despite the library being in the same folder:

ImportError: DLL load failed while importing _libprojectApiPy38_64: The specified module could not be found.

Key info:

  • I already have installed MSVC 2015-2019
  • I installed the msvc-runtime package using pip
  • I installed the pywin32 package using pip

Please note that I have already done the exact same procedure for Python 3.7 and the library works with no issue, this only happens when using Python 3.8.

Thank you!

pierre_rt
  • 11
  • 1
  • I am also facing a similar issue https://stackoverflow.com/questions/66814716/issue-in-importing-awkward-array-package-dll-load-failed-while-importing-ext – MSS Apr 05 '21 at 17:02
  • Have you tried importing the `_libmyprojectApiPy38_64` while inside the folder it resides. – Jens Munk May 15 '21 at 11:26

0 Answers0