What should I do if pyd cannot import?

Asked 2 years ago, Updated 2 years ago, 38 views

Importing foo.pyd from the interpreter will work. Importing abcde.pyd in the same folder will result in the following error.

>>import abcde
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
 ImportError: DLL load failed—The specified module was not found.

dumpbin/exports because it is in the same folder, so if you do dumpbin/exports, the function PyInit_* also exists as follows.

>dumpbin/exports abcde
 :
           100027CA0PyInit_abcde
 :

In this situation, what other problems do you think are there?Also, how can I confirm it?

I would appreciate it if you could let me know, but both of them are pyd created from C++ to cython, foo.pyd is made from your own simple code, and abcde.pyd is a compilation of other libraries (I'm sorry, but I can't reveal it specifically).

python python3 cython

2022-09-29 22:48

1 Answers

On the other hand, abcde.pyd is a compilation of other libraries (I'm sorry, but I can't reveal it specifically).

"Other libraries" are DLLs, and the Isn't the loading failed because it's not in the right place?

If "abcde.pyd" is simply not found, it will be ModuleNotFoundError, not ImportError.


2022-09-29 22:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.