Das Programm funktioniert vor dem Packen normal, stürzt jedoch ab, wenn es nach dem Packen ausgeführt wird. Die im Befehl verwendeten Module sind:
aus PyQt5 importieren QtCore, QtGui, QtWidgets
Anfragen importieren, Betriebssystem, sys
aus Anfragen.packages.urllib3.Exceptions importieren InsecureRequestWarning
Der Ausführungsbefehl lautet: D:PythonScriptspyinstaller.exe -i c:12.ico --hidden-import=PyQt5 --hidden-import=queue -F -w C:UsersAdministratorDesktopipmi2.py
Was ist das 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
何不直接尝试一下
pyinstaller -F -w ipmi2.py
原因找到了,是我requests版本太高,不能用最新版,换成2.10版本就好了。。。参考了:https://www.zhihu.com/questio...