我的python文件可以直接使用python运行:
python detectIPConflict.py
Run Code Online (Sandbox Code Playgroud)
但是,当PyInstaller打包的脚本时:
pyinstaller --onefile detectIPConflict.py
./dist/detectIPConflict
Run Code Online (Sandbox Code Playgroud)
出现错误:
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller-3.1.1-py2.7.egg/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "scapy/all.py", line 46, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller-3.1.1-py2.7.egg/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "scapy/crypto/__init__.py", line 17, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller-3.1.1-py2.7.egg/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "scapy/crypto/cert.py", line 19, in <module>
AttributeError: 'module' object has no attribute 'RSA' …Run Code Online (Sandbox Code Playgroud)