Using Cython Extension Once Compiled [under Windows], How To Use .pyd's?
Solution 1:
It's clearly written in the documentation you linked:
Note that the search path for
foo.pyd
isPYTHONPATH
, not the same as the path that Windows uses to search forfoo.dll
. Also, foo.pyd need not be present to run your program, whereas if you linked your program with a dll, the dll is required. Of course, foo.pyd is required if you want to say import foo. In a DLL, linkage is declared in the source code with __declspec(dllexport). In a .pyd, linkage is defined in a list of available functions.
So you should either place your .pyd
file inside the python's installation directories(site-packages
), or you can modify the environmental variable PYTHONPATH
and add the directory where the .pyd
is placed.
Yet an other alternative is to use .pth
files to extend the PYTHONPATH
.
Post a Comment for "Using Cython Extension Once Compiled [under Windows], How To Use .pyd's?"