I'm working in Windows, using PyInstaller
to package a python file. But some error is occuring:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "D:Useful Appspyinstaller-2.0PyInstallerloaderiu.py", line 386, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "D:Useful Appspyinstaller-2.0PyInstallerloaderiu.py", line 480, in doimport
exec co in mod.__dict__
File "D:Useful Appspyinstaller-2.0serveruildpyi.win32serverout00-PYZ.pyzSocketServer", line 132, in <module>
File "D:Useful Appspyinstaller-2.0PyInstallerloaderiu.py", line 386, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "D:Useful Appspyinstaller-2.0PyInstallerloaderiu.py", line 480, in doimport
exec co in mod.__dict__
File "D:Useful Appspyinstaller-2.0serveruildpyi.win32serverout00-PYZ.pyzsocket", line 47, in <module>
File "D:Useful Appspyinstaller-2.0PyInstallerloaderiu.py", line 409, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named _socket
I know that _socket
is in path C:Python27libs\_socket.lib
, but how can let the generated EXE
find that file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…