PyInstaller failing to include some modules from C:\Python27\Lib

前端 未结 3 1829
野趣味
野趣味 2021-02-06 11:40

I\'ve been repeatedly making good PyInstaller executables of a Tkinter utility program, and suddenly this morning the resulting executable fails with a \"can\'t import\" error f

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-06 12:25

    For unix/linux users, make sure the that you are referencing the same packages when compiling as the application do. This issue mainly occurs when using a virtual environment. For that purpose spot the installed package folder and edit the myapp.spec. Then run

    pyinstaller myapp.spec
    

提交回复
热议问题