
If you are having trouble with a Python extension module you have built yourself that has not been installed via pip or conda, you will need to check any dependency DLLs are present in the correct place so they can be found. Try uninstalling with both pip and conda before re-installing using only one of pip or conda to make sure. It is important not to install a package using both pip and conda as this can result in two different versions being installed which could conflict. Uninstalling the package and re-installing it can help if this is the case. If the DLL dependencies are missing then it can point to a problem that occured when installing the package.


The "Library/bin" folder is added to your PATH automatically when PyXLL starts. If you are using Anaconda and have used conda to install the Python extension then it may have installed the DLL dependencies into the "Library/bin" folder in the conda environment. Typically any DLL dependencies are installed in the same folder as the. When loading a Python extension module, any DLL dependencies must either be located in the same folder as the Python extension module, or in a folder included in the PATH environment variable. If these DLLs can't be found when trying to load the Python extension module then the module won't be able to be imported and that is what this error is telling you. When a Python extension module is compiled it may depend on some additional libraries called DLLs, or Dynamic Link Libraries. pyd file), if any DLL dependencies can't be loaded you will see the error message:ĭLL load failed: The specified module could not be found When importing a compiled Python extension module (a. The problem has been fixed and should be included in the next release of pywin32, but for now you will need to use version 228 or an earlier release of pywin32.

To fix it install version 228 of pywin32 by running the following: pip install -force-reinstall "pywin32=228"Ī bug was introduced in version 300 of pywin32 that causes this error. then it is likely the cause is a bug in the version of pywin32 you are using. If you are seeing this error when importing any of the pywin32 packages, eg win32api or win32gui etc.
