简体   繁体   English

运行由 auto-py-to-exe 生成的 an.exe 时出错

[英]error while running an .exe generated by auto-py-to-exe

While generating a.exe via auto-py-to-exe, I face the following output in auto-py-to-exe window.通过 auto-py-to-exe 生成 a.exe 时,我在 auto-py-to-exe window 中遇到以下 output。

Running auto-py-to-exe v2.18.0
Building directory: C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw
Provided command: pyinstaller --noconfirm --onefile --console  "C:/Users/user_name/Desktop/files/Name2/Name3/Single_file.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onefile --console C:/Users/user_name/Desktop/files/Name2/Name3/Single_file.py --distpath C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\application --workpath C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\build --specpath C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw

35143 INFO: PyInstaller: 4.10
35157 INFO: Python: 3.9.7 (conda)
35202 INFO: Platform: Windows-10-10.0.22000-SP0
35208 INFO: wrote C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\Single_file.spec
35242 INFO: UPX is not available.
35247 INFO: Extending PYTHONPATH with paths
['C:\\Users\\user_name\\Desktop\\files\\Name2\\Name3']
35629 INFO: checking Analysis
35656 INFO: Building Analysis because Analysis-00.toc is non existent
35666 INFO: Initializing module dependency graph...
35677 INFO: Caching module graph hooks...
35706 INFO: Analyzing base_library.zip ...
37658 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
37669 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib'
40227 INFO: Caching module dependency graph...
40402 INFO: running Analysis Analysis-00.toc
40450 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Users\user_name\Anaconda3\envs\Environment1\python.exe
40748 INFO: Analyzing C:\Users\user_name\Desktop\files\Name2\Name3\Single_file.py
44125 INFO: Processing pre-find module path hook site from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
44146 INFO: site: retargeting to fake-dir 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\fake-modules'
49605 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
59349 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
61799 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
80027 INFO: Processing module hooks...
80037 INFO: Loading module hook 'hook-appdirs.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
80064 INFO: Loading module hook 'hook-bcrypt.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
80077 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
80094 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
80443 INFO: Loading module hook 'hook-docutils.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82177 INFO: Loading module hook 'hook-eel.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82349 INFO: Loading module hook 'hook-IPython.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82847 INFO: Loading module hook 'hook-jedi.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
83937 INFO: Loading module hook 'hook-jinja2.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
83976 INFO: Loading module hook 'hook-jsonschema.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84008 INFO: Loading module hook 'hook-nacl.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84028 INFO: Loading module hook 'hook-nbformat.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84127 INFO: Loading module hook 'hook-openpyxl.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84231 INFO: Loading module hook 'hook-parso.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84253 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84284 INFO: Loading module hook 'hook-pythoncom.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84712 INFO: Loading module hook 'hook-pywintypes.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85221 INFO: Loading module hook 'hook-regex.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85253 INFO: Loading module hook 'hook-sklearn.cluster.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85263 INFO: Loading module hook 'hook-sklearn.linear_model.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85278 INFO: Loading module hook 'hook-sklearn.metrics.cluster.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85292 INFO: Loading module hook 'hook-sklearn.neighbors.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85307 WARNING: Hidden import "sklearn.neighbors._typedefs" not found!
85386 INFO: Loading module hook 'hook-sklearn.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85852 INFO: Loading module hook 'hook-sklearn.tree.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85862 INFO: Loading module hook 'hook-sklearn.utils.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85870 INFO: Loading module hook 'hook-win32com.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
86357 INFO: Loading module hook 'hook-zmq.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
86741 INFO: Loading module hook 'hook-babel.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87076 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87118 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87183 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87206 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87326 INFO: Loading module hook 'hook-gevent.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
87801 INFO: Determining a mapping of distributions to packages...
114340 WARNING: Unable to find package for requirement zope.interface from package gevent.
114346 WARNING: Unable to find package for requirement zope.event from package gevent.
114377 INFO: Packages required by gevent:
['setuptools', 'cffi', 'greenlet']
115285 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
115289 INFO: Loading module hook 'hook-importlib_metadata.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
115297 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
115360 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
116176 INFO:   Matplotlib backend "GTK3Agg": ignored
    backend Gtk3Agg requires cairo
116604 INFO:   Matplotlib backend "GTK3Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
117041 INFO:   Matplotlib backend "GTK4Agg": ignored
    backend Gtk4Agg requires cairo
117485 INFO:   Matplotlib backend "GTK4Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
117889 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name '_macosx' from 'matplotlib.backends' (C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\matplotlib\backends\__init__.py)
118809 INFO:   Matplotlib backend "nbAgg": added
119443 INFO:   Matplotlib backend "QtAgg": added
119900 INFO:   Matplotlib backend "QtCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
120499 INFO:   Matplotlib backend "Qt5Agg": added
120936 INFO:   Matplotlib backend "Qt5Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
121752 INFO:   Matplotlib backend "TkAgg": added
122511 INFO:   Matplotlib backend "TkCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
123133 INFO:   Matplotlib backend "WebAgg": added
123877 INFO:   Matplotlib backend "WX": ignored
    No module named 'wx'
124301 INFO:   Matplotlib backend "WXAgg": ignored
    No module named 'wx'
124763 INFO:   Matplotlib backend "WXCairo": ignored
    No module named 'wx'
125250 INFO:   Matplotlib backend "agg": added
125665 INFO:   Matplotlib backend "cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
126560 INFO:   Matplotlib backend "pdf": added
127371 INFO:   Matplotlib backend "pgf": added
127971 INFO:   Matplotlib backend "ps": added
128461 INFO:   Matplotlib backend "svg": added
129147 INFO:   Matplotlib backend "template": added
131552 INFO: Loading module hook 'hook-matplotlib.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
131992 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132008 INFO: Loading module hook 'hook-numpy.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132074 WARNING: Conda distribution 'numpy', dependency of 'numpy', was not found. If you installed this distribution with pip then you may ignore this warning.
132127 INFO: Import to be excluded not found: 'f2py'
132141 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132153 INFO: Loading module hook 'hook-packaging.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132164 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132651 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
132936 INFO: Loading module hook 'hook-pandas.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133583 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133608 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133895 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133911 INFO: Loading module hook 'hook-PIL.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133928 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
133969 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
134697 WARNING: Hidden import "pkg_resources.py2_warn" not found!
134756 WARNING: Hidden import "pkg_resources.markers" not found!
134770 INFO: Loading module hook 'hook-pygments.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
136336 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137166 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137233 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137343 INFO: Loading module hook 'hook-PyQt5.QtSvg.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137569 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137769 INFO: Loading module hook 'hook-pytz.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137950 INFO: Loading module hook 'hook-scipy.linalg.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
137961 INFO: Loading module hook 'hook-scipy.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138006 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138026 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138152 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138166 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138177 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
138189 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
139085 INFO: Loading module hook 'hook-sphinx.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
143598 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
143726 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
143729 INFO: Loading module hook 'hook-wcwidth.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
143737 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144095 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144121 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144125 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144133 INFO: Loading module hook 'hook-zope.interface.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144142 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
144352 INFO: checking Tree
144366 INFO: Building Tree because Tree-00.toc is non existent
144377 INFO: Building Tree Tree-00.toc
144665 INFO: checking Tree
144682 INFO: Building Tree because Tree-01.toc is non existent
144691 INFO: Building Tree Tree-01.toc
144820 INFO: checking Tree
144833 INFO: Building Tree because Tree-02.toc is non existent
144844 INFO: Building Tree Tree-02.toc
144855 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks'...
145022 INFO: Looking for ctypes DLLs
145173 INFO: Analyzing run-time hooks ...
145230 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py'
145276 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
145297 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
145335 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
145372 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32api.py'
145383 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
145428 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32comgenpy.py'
145442 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
145452 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
145466 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_mplconfig.py'
145481 INFO: Including run-time hook 'C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\pyi_rth_traitlets.py'
145518 INFO: Looking for dynamic libraries
146610 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\_device.cp39-win_amd64.pyd
146622 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\_version.cp39-win_amd64.pyd
146636 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\_poll.cp39-win_amd64.pyd
146655 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\utils.cp39-win_amd64.pyd
146666 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\error.cp39-win_amd64.pyd
146669 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\message.cp39-win_amd64.pyd
146703 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\socket.cp39-win_amd64.pyd
146719 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\_proxy_steerable.cp39-win_amd64.pyd
146733 WARNING: lib not found: libzmq.cp39-win_amd64.pyd dependency of C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\zmq\backend\cython\context.cp39-win_amd64.pyd
147795 INFO: Looking for eggs
147805 INFO: Using Python library C:\Users\user_name\Anaconda3\envs\Environment1\python39.dll
147817 INFO: Found binding redirects: 
[]
147847 INFO: Warnings written to C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\build\Single_file\warn-Single_file.txt
148152 INFO: Graph cross-reference written to C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\build\Single_file\xref-Single_file.html
148369 INFO: checking PYZ
148382 INFO: Building PYZ because PYZ-00.toc is non existent
148391 INFO: Building PYZ (ZlibArchive) C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\build\Single_file\PYZ-00.pyz
151269 INFO: Building PYZ (ZlibArchive) C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\build\Single_file\PYZ-00.pyz completed successfully.
151335 INFO: checking PKG
151351 INFO: Building PKG because PKG-00.toc is non existent
151366 INFO: Building PKG (CArchive) Single_file.pkg
192578 INFO: Building PKG (CArchive) Single_file.pkg completed successfully.
192707 INFO: Bootloader C:\Users\user_name\Anaconda3\envs\Environment1\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
192738 INFO: checking EXE
192747 INFO: Building EXE because EXE-00.toc is non existent
192776 INFO: Building EXE from EXE-00.toc
192785 INFO: Copying bootloader EXE to C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\application\Single_file.exe.notanexecutable
194475 INFO: Copying icon to EXE
194491 INFO: Copying icons from ['C:\\Users\\user_name\\Anaconda3\\envs\\Environment1\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico']
195030 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
195046 INFO: Writing RT_ICON 1 resource with 3752 bytes
195076 INFO: Writing RT_ICON 2 resource with 2216 bytes
195077 INFO: Writing RT_ICON 3 resource with 1384 bytes
195085 INFO: Writing RT_ICON 4 resource with 37019 bytes
195085 INFO: Writing RT_ICON 5 resource with 9640 bytes
195094 INFO: Writing RT_ICON 6 resource with 4264 bytes
195110 INFO: Writing RT_ICON 7 resource with 1128 bytes
195124 INFO: Copying 0 resources to EXE
195135 INFO: Emedding manifest in EXE
195146 INFO: Updating manifest in C:\Users\user_name\AppData\Local\Temp\tmpcujb3jiw\application\Single_file.exe.notanexecutable
195602 INFO: Updating resource type 24 name 1 language 0
195615 INFO: Appending PKG archive to EXE
218702 INFO: Building EXE from EXE-00.toc completed successfully.

Moving project to: C:\Users\user_name\output
Complete.

Once the.exe is generated I try to run it but it closes by it self immediately.生成 .exe 后,我尝试运行它,但它立即自行关闭。

while running the.exe from the CMD I face the following outcome:从 CMD 运行 the.exe 时,我面临以下结果:

xgboost\compat.py:36: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
Traceback (most recent call last):
  File "Single_file.py", line 12, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "xgboost\__init__.py", line 9, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "xgboost\core.py", line 203, in <module>
  File "xgboost\core.py", line 157, in _load_lib
  File "xgboost\libpath.py", line 64, in find_lib_path
xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path.  List of candidates:
- C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\xgboost\lib\xgboost.dll
- C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\xgboost\..\..\lib\xgboost.dll
- C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\lib\xgboost.dll
- C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\xgboost\../../windows/x64/Release/xgboost.dll
- C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\xgboost\./windows/x64/Release/xgboost.dll
XGBoost Python package path: C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file\xgboost
sys.prefix: C:\Users\user_name\Desktop\files\Name2\Name3\output\Single_file
See: https://xgboost.readthedocs.io/en/latest/build.html for installing XGBoost.
[17764] Failed to execute script 'Single_file' due to unhandled exception!

I tried other tools than auto-py-to-exe, for example: py2exe or pyinstaller but faced the same issue as well!我尝试了除 auto-py-to-exe 之外的其他工具,例如:py2exe 或 pyinstaller,但也遇到了同样的问题!

The.py relies on the following libraries: The.py 依赖以下库:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import preprocessing
import matplotlib.pyplot as plt
import xgboost as xgb
import re
from sklearn.model_selection import train_test_split
from sklearn.multioutput import MultiOutputRegressor
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
from sklearn.metrics import accuracy_score
from operator import add
import statistics
import warnings

Support/ideas would be highly appreciated.支持/想法将不胜感激。

Have you installed the XGBoost library ?你有没有安装XGBoost 库 It cannot find the XGBoost library:它找不到 XGBoost 库:

xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path. xgboost.libpath.XGBoostLibraryNotFound:在候选路径中找不到 XGBoost 库。 List of candidates:候选人名单:
........... …………
See: https://xgboost.readthedocs.io/en/latest/build.html for installing XGBoost.请参阅: https://xgboost.readthedocs.io/en/latest/build.html安装 XGBoost。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM