Pycharm does not recognize .pyd file as a module
Hi, I have an external libray (pyembree) which I have compiled and installed on my project's virtual environment.

Now I am trying to use this library on my project. If I just write "import pyembree" it works without issues since it does not show any red underscore on the import statement. However, apparently it does not load/recognize all the modules of the library, since if I try now to import the rtcore_scene module it gives me an error saying:
ImportError: DLL load failed while importing rtcore_scene: The specified module could not be found.
Can someone tell me what I am doing wrong here.
I am using Pycharcm CE and I am on a Windows 10 machine, if this helps somehow.
Please sign in to leave a comment.
Hi,
First of all, please try running your code from the terminal outside of IDE using the same interpreter. This will show if the issue is IDE related.
Well it seems that I am getting the same error also from the command line, thus I guess it might not be direclty IDE related. I am not sure though what to check next.
ok, it seems that setting up a conda environment and installing the package from there I can find the lib modules without issues both in pycharm and console. Installing though the package in a virtualenv environment I cannot make it to be found in neither of them. Strange.
Yes, I should have recommended using Anaconda initially, sorry for that. Anaconda is better suited for working with cython/c++ modules.
.pyd files must be in the directory included in PYTHONPATH. Make sure sys.path has the required location. Or you can simply do sys.path.append("full/path/to/pyembree").