我正在使用:pyinstaller3.2(我也尝试开发版本)
Windows 10
python 3.5.2版
代码是:import socket
print("test")
so = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
so.setblocking(True)
print(so)
我像这样启动pyinstaller
^{pr2}$
当我启动可执行文件时,我得到以下信息:Traceback (most recent call last):
File "test.py", line 1, in
File "c:\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "socket.py", line 49, in
ImportError: No module named '_socket'
Failed to execute script test
警告文件警告测试.txt像这样(我把它缩短了)[...]
missing module named math.cos - imported by math, random, D:\Projet\eq_sim\test.py
missing module named socket.SOCK_STREAM - imported by socket, ssl, D:\Projet\eq_sim\test.p