Imported module not found in PyInstaller

前端 未结 7 2023
一整个雨季
一整个雨季 2020-12-01 15:21

I\'m working in Windows, using PyInstaller to package a python file. But some error is occuring:

Traceback (most recent call last):
  File \"<         


        
7条回答
  •  [愿得一人]
    2020-12-01 15:59

    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

提交回复
热议问题