This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".
出现这个问题多半问题是python与Qt路径的问题
所以我用pip install pyinstaller保证与我使用的python版本一致
然后安装PyQt5:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5
然后再去打包程序
C:\Users\zhaozhiyi>pyinsatller -F Euler.py
'pyinsatller' 不是内部或外部命令,也不是可运行的程序
或批处理文件。 C:\Users\zhaozhiyi>Pyinstaller -F Euler.py
INFO: PyInstaller: 3.3.
INFO: Python: 3.6.
INFO: Platform: Windows--10.0.-SP0
INFO: wrote C:\Users\zhaozhiyi\Euler.spec
INFO: UPX is not available.
INFO: Extending PYTHONPATH with paths
['C:\\Users\\zhaozhiyi', 'C:\\Users\\zhaozhiyi']
INFO: checking Analysis
INFO: Building because C:\Users\zhaozhiyi\Euler.py changed
INFO: Initializing module dependency graph...
INFO: Initializing module graph hooks...
INFO: Analyzing base_library.zip ...
INFO: running Analysis out00-Analysis.toc
INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\programdata\anaconda3\python.exe
INFO: Caching module hooks...
INFO: Analyzing C:\Users\zhaozhiyi\Euler.py
INFO: Processing pre-find module path hook distutils
INFO: Processing pre-find module path hook site
INFO: site: retargeting to fake-dir 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\fake-modules'
INFO: Processing pre-safe import module hook six.moves
INFO: Processing pre-safe import module hook requests.packages.urllib3.packages.six.moves
INFO: Loading module hooks...
INFO: Loading module hook "hook-cryptography.py"...
INFO: Loading module hook "hook-distutils.py"...
INFO: Loading module hook "hook-encodings.py"...
INFO: Loading module hook "hook-IPython.py"...
INFO: Excluding import 'gtk'
INFO: Excluding import 'matplotlib'
INFO: Removing import of matplotlib from module IPython.core.pylabtools
INFO: Removing import of matplotlib.figure from module IPython.core.pylabtools
INFO: Removing import of matplotlib.pyplot from module IPython.core.pylabtools
INFO: Removing import of matplotlib._pylab_helpers from module IPython.core.pylabtools
INFO: Excluding import 'PyQt5'
INFO: Removing import of PyQt5.QtSvg from module IPython.external.qt_loaders
INFO: Removing import of PyQt5.QtWidgets from module IPython.external.qt_loaders
INFO: Removing import of PyQt5 from module IPython.external.qt_loaders
INFO: Removing import of PyQt5.QtGui from module IPython.external.qt_loaders
INFO: Removing import of PyQt5.QtCore from module IPython.external.qt_loaders
INFO: Excluding import 'tkinter'
INFO: Removing import of tkinter from module IPython.lib.clipboard
INFO: Excluding import 'PyQt4'
INFO: Removing import of PyQt4 from module IPython.external.qt_loaders
INFO: Excluding import 'PySide'
INFO: Removing import of PySide from module IPython.external.qt_loaders
INFO: Loading module hook "hook-jinja2.py"...
INFO: Loading module hook "hook-jsonschema.py"...
INFO: Loading module hook "hook-lib2to3.py"...
INFO: Loading module hook "hook-matplotlib.backends.py"...
INFO: Matplotlib backend "GTK": ignored
Gtk* backend requires pygtk to be installed.
INFO: Matplotlib backend "GTKAgg": ignored
Gtk* backend requires pygtk to be installed.
INFO: Matplotlib backend "GTKCairo": ignored
No module named 'gtk'
INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx'
INFO: Matplotlib backend "Qt4Agg": added
INFO: Matplotlib backend "Qt5Agg": added
INFO: Matplotlib backend "TkAgg": added
INFO: Matplotlib backend "WX": ignored
Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.
INFO: Matplotlib backend "WXAgg": ignored
Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.
INFO: Matplotlib backend "GTK3Cairo": ignored
Gtk3 backend requires pygobject to be installed.
INFO: Matplotlib backend "GTK3Agg": ignored
Gtk3 backend requires pygobject to be installed.
INFO: Matplotlib backend "WebAgg": added
INFO: Matplotlib backend "nbAgg": added
INFO: Matplotlib backend "agg": added
INFO: Matplotlib backend "cairo": ignored
Cairo backend requires that cairocffi or pycairo is installed.
INFO: Matplotlib backend "gdk": ignored
No module named 'gobject'
INFO: Matplotlib backend "pdf": added
INFO: Matplotlib backend "pgf": added
INFO: Matplotlib backend "ps": added
INFO: Matplotlib backend "svg": added
INFO: Matplotlib backend "template": added
INFO: Loading module hook "hook-matplotlib.py"...
INFO: Loading module hook "hook-numpy.core.py"...
INFO: MKL libraries found when importing numpy. Adding MKL to binaries
INFO: Loading module hook "hook-PIL.Image.py"...
INFO: Loading module hook "hook-PIL.py"...
INFO: Import to be excluded not found: 'FixTk'
INFO: Excluding import 'PyQt5'
INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt
INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt
INFO: Excluding import 'tkinter'
INFO: Removing import of tkinter from module PIL.ImageTk
INFO: Excluding import 'PyQt4'
INFO: Removing import of PyQt4 from module PIL.ImageQt
INFO: Excluding import 'PySide'
INFO: Removing import of PySide from module PIL.ImageQt
INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
INFO: Excluding import 'tkinter'
INFO: Import to be excluded not found: 'FixTk'
INFO: Loading module hook "hook-pkg_resources.py"...
INFO: Processing pre-safe import module hook win32com
INFO: Loading module hook "hook-pycparser.py"...
INFO: Loading module hook "hook-pydoc.py"...
INFO: Loading module hook "hook-pygments.py"...
INFO: Loading module hook "hook-PyQt5.py"...
INFO: Loading module hook "hook-PyQt5.Qt.py"...
INFO: Loading module hook "hook-PyQt5.QtCore.py"...
INFO: Loading module hook "hook-PyQt5.QtGui.py"...
INFO: Loading module hook "hook-PyQt5.QtPrintSupport.py"...
INFO: Loading module hook "hook-PyQt5.QtSvg.py"...
INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
INFO: Loading module hook "hook-pythoncom.py"...
INFO: Loading module hook "hook-pytz.py"...
INFO: Loading module hook "hook-pywintypes.py"...
INFO: Loading module hook "hook-requests.py"...
INFO: Loading module hook "hook-setuptools.py"...
INFO: Loading module hook "hook-sqlite3.py"...
INFO: Loading module hook "hook-sysconfig.py"...
INFO: Loading module hook "hook-win32com.py"...
INFO: Loading module hook "hook-xml.dom.domreg.py"...
INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
INFO: Loading module hook "hook-xml.py"...
INFO: Loading module hook "hook-zmq.py"...
INFO: Excluding import 'zmq.libzmq'
INFO: Removing import of zmq.libzmq from module zmq
INFO: Loading module hook "hook-_tkinter.py"...
INFO: checking Tree
INFO: checking Tree
INFO: Loading module hook "hook-gevent.monkey.py"...
INFO: Looking for ctypes DLLs
INFO: Analyzing run-time hooks ...
INFO: Including run-time hook 'pyi_rth__tkinter.py'
INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
INFO: Including run-time hook 'pyi_rth_pkgres.py'
INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
INFO: Including run-time hook 'pyi_rth_qt5.py'
INFO: Including run-time hook 'pyi_rth_traitlets.py'
INFO: Including run-time hook 'pyi_rth_mplconfig.py'
INFO: Including run-time hook 'pyi_rth_mpldata.py'
INFO: Looking for dynamic libraries
WARNING: lib not found: tbb.dll dependency of c:\programdata\anaconda3\Library\bin\mkl_tbb_thread.dll
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\_poll.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\_device.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\_version.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\message.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\error.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\context.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\socket.cp36-win_amd64.pyd
WARNING: lib not found: libzmq.cp36-win_amd64.pyd dependency of c:\programdata\anaconda3\lib\site-packages\zmq\backend\cython\utils.cp36-win_amd64.pyd
INFO: Looking for eggs
INFO: Using Python library c:\programdata\anaconda3\python36.dll
INFO: Found binding redirects:
[]
INFO: Warnings written to C:\Users\zhaozhiyi\build\Euler\warnEuler.txt
INFO: Graph cross-reference written to C:\Users\zhaozhiyi\build\Euler\xref-Euler.html
INFO: checking PYZ
INFO: Building because toc changed
INFO: Building PYZ (ZlibArchive) C:\Users\zhaozhiyi\build\Euler\out00-PYZ.pyz
INFO: Building PYZ (ZlibArchive) C:\Users\zhaozhiyi\build\Euler\out00-PYZ.pyz completed successfully.
INFO: checking PKG
INFO: Building because toc changed
INFO: Building PKG (CArchive) out00-PKG.pkg
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\sip.pyd
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\qt5core.dll
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\qt5gui.dll
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\qt5svg.dll
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\qt5printsupport.dll
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\python3.dll
INFO: Updating resource type name language
INFO: Updating manifest in C:\Users\zhaozhiyi\AppData\Roaming\pyinstaller\bincache00_py36_64bit\qt5widgets.dll
INFO: Updating resource type name language
INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
INFO: Bootloader c:\programdata\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
INFO: checking EXE
INFO: Building because name changed
INFO: Building EXE from out00-EXE.toc
INFO: Appending archive to EXE C:\Users\zhaozhiyi\dist\Euler.exe
INFO: Building EXE from out00-EXE.toc completed successfully.
successfully!!!!!!!!!!!!!