Imported module not found in PyInstaller

前端 未结 7 2007
一整个雨季
一整个雨季 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 16:05

    The executor does not know the location of the library, "C:\Python27\Lib\site-packages" etc. Thus, pyinstaller binds the module locations when creating the executable. Therefore, you need to import all the modules, you have used into your program.

    Import the "_socket" module in your main file and recompile using pyinstaller.

    I would probably work.

    Note: But the versions of the modules installed in your system and used in the program must be compatible.

    0 讨论(0)
提交回复
热议问题