我在 Windows 中工作,PyInstaller
用于打包 python 文件。但是发生了一些错误:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
exec co in mod.__dict__
File "D:\Useful Apps\pyinstaller-2.0\server\build\pyi.win32\server\out00-PYZ.pyz\SocketServer", line 132, in <module>
File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
exec co in mod.__dict__
File "D:\Useful Apps\pyinstaller-2.0\server\build\pyi.win32\server\out00-PYZ.pyz\socket", line 47, in <module>
File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 409, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named _socket
我知道那_socket
是在 path C:\Python27\libs\_socket.lib
,但是如何让生成的EXE
找到那个文件呢?