简体   繁体   中英

PyInstaller: ValueError: Module file ... is missing

To protect my code, I convert test.py to test.pyd.

test.py and test.pyd are now in the same folder.

Then I use pyinstaller -F test.py to get exe. As far as I know, pyd has higer priority than py, so pyinstaller will try to get code from test.pyd, right?

Anyway, I got this error after using the above command: ValueError: Module file .../test.py is missing .

If there is only test.py in the folder, the command works just fine. So why it shows this error when test.pyd is also in the folder...and how to solve this... 在此处输入图片说明

PyInstaller==3.4 Python==3.6.8

This happened to me when I tried pyinstaller entrypoint.spec based on entrypoint.py , when I discovered I had accidentally created the file entrypoint.pyd in the same folder. Removing the pyd file resolved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM