简体   繁体   中英

Pyinstaller Hidden imports and user defined modules error

在此处输入图像描述

Basically I made a GUI app and it has a lot of user defined modules stored in different py files. All of these py files have been imported as modules in the main file but whenever i run the executable this exception is generated in the command prompt. I have no idea how to solve this problem

If you are using virtualenv you should use the "-p" or "--path='D:...'" option. Like this:

pyinstaller.exe --onefile --paths=D:\env\Lib\site-packages  .\foo.py

What this does is generates foo.spec file with this pathex path

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