How to use a .pyd

Daniel Dittmar daniel.dittmar at
Fri Nov 7 14:01:01 CET 2003

Liu Kun, SLC ICM (BJ) wrote:
>     I want to use a method from _xxx_yyy.pyd, but I can not use
> import to load this file, how to use .pyd in python interpreter?

You *have* to import the .pyd file. If this fails, then probably the .pyd
file has been compiled for a different Python version.

On Windows, a typical error message for this would be
>>> import whatever
Fatal Python error: PyThreadState_Get: no current thread

abnormal program termination

If you can't import te .pyd file because it's location isn't in sys.path,
then simply append the directory to sys.path.


More information about the Python-list mailing list