python - pyinstaller packaging problem
世界只因有你
世界只因有你 2017-05-18 10:44:02
0
2
1128

The program is normal before packaging, but crashes when executed after packaging. The modules used in the command are:
from PyQt5 import QtCore, QtGui, QtWidgets
import requests, os, sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning

The execution command is: D:\Python\Scripts\pyinstaller.exe -i c:\12.ico --hidden-import=PyQt5 --hidden-import=queue -F -w C:\Users\Administrator\Desktop \ipmi2.py
So what is the problem?

missing module named resource - imported by posix, C:\Users\Administrator\Desktop\ipmi2.py
missing module named posix - imported by os, C:\Users\Administrator\Desktop\ipmi2.py
missing module named _posixsubprocess - imported by subprocess, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'org.python' - imported by pickle, C:\Users\Administrator\Desktop\ipmi2.py, xml.sax
missing module named readline - imported by cmd, code, pdb, C:\Users\Administrator\Desktop\ipmi2.py
missing module named java - imported by platform, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'java.lang' - imported by platform, C:\Users\Administrator\Desktop\ipmi2.py, xml.sax._exceptions
missing module named vms_lib - imported by platform, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'requests.packages.urllib3.packages.six.moves' - imported by requests.packages.urllib3.exceptions, requests.packages.urllib3.connectionpool, requests.packages.urllib3.connection, requests.packages.urllib3.util.response, requests.packages.urllib3.request, requests.packages.urllib3.response, requests.packages.urllib3.poolmanager, C:\Users\Administrator\Desktop\ipmi2.py
missing module named Queue - imported by requests.packages.urllib3.connectionpool, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib3 - imported by requests.packages, C:\Users\Administrator\Desktop\ipmi2.py
missing module named chardet - imported by requests.packages, C:\Users\Administrator\Desktop\ipmi2.py
missing module named OpenSSL - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named cryptography - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'cryptography.hazmat' - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named six - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'cryptography.x509' - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named 'OpenSSL.crypto' - imported by requests.packages.urllib3.contrib.pyopenssl, C:\Users\Administrator\Desktop\ipmi2.py
missing module named certifi - imported by requests.certs, C:\Users\Administrator\Desktop\ipmi2.py
missing module named idna - imported by requests.packages.urllib3.contrib.pyopenssl, requests.models, C:\Users\Administrator\Desktop\ipmi2.py
missing module named socks - imported by requests.packages.urllib3.contrib.socks, C:\Users\Administrator\Desktop\ipmi2.py
missing module named simplejson - imported by requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.urlencode - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.getproxies - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.unquote - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.proxy_bypass - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.quote - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.unquote_plus - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib.quote_plus - imported by urllib, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urlparse - imported by requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named urllib2 - imported by requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named cookielib - imported by requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named Cookie - imported by requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named StringIO - imported by requests.packages.urllib3.packages.six, requests.compat, C:\Users\Administrator\Desktop\ipmi2.py
missing module named thread - imported by requests.packages.urllib3.packages.ordered_dict, C:\Users\Administrator\Desktop\ipmi2.py
missing module named dummy_thread - imported by requests.packages.urllib3.packages.ordered_dict, C:\Users\Administrator\Desktop\ipmi2.py
missing module named _abcoll - imported by requests.packages.urllib3.packages.ordered_dict, C:\Users\Administrator\Desktop\ipmi2.py
missing module named backports - imported by requests.packages.urllib3.packages.ssl_match_hostname, C:\Users\Administrator\Desktop\ipmi2.py
missing module named grp - imported by tarfile, shutil, C:\Users\Administrator\Desktop\ipmi2.py
excluded module named _frozen_importlib - imported by importlib, importlib.abc, C:\Users\Administrator\Desktop\ipmi2.py
missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, C:\Users\Administrator\Desktop\ipmi2.py
missing module named termios - imported by tty, getpass, C:\Users\Administrator\Desktop\ipmi2.py
missing module named _scproxy - imported by urllib.request, C:\Users\Administrator\Desktop\ipmi2.py
missing module named org - imported by copy, C:\Users\Administrator\Desktop\ipmi2.py
missing module named _dummy_threading - imported by dummy_threading, C:\Users\Administrator\Desktop\ipmi2.py
missing module named pwd - imported by posixpath, tarfile, shutil, http.server, webbrowser, netrc, getpass, C:\Users\Administrator\Desktop\ipmi2.py
missing module named ce - imported by os, C:\Users\Administrator\Desktop\ipmi2.py
世界只因有你
世界只因有你

reply all(2)
阿神

Why not just try it pyinstaller -F -w ipmi2.py

淡淡烟草味

The reason is found. My requests version is too high and I cannot use the latest version. Just change it to version 2.10. . . Reference: https://www.zhihu.com/questio...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template