error while running an .exe generated by auto-py-to-exe - python

While generating a .exe via auto-py-to-exe, I face the following output in auto-py-to-exe window.
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.
while running the .exe from the CMD I face the following outcome:
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!
The .py relies on the following libraries:
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?
It cannot find the XGBoost library:
xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path. List of candidates:
...........
See: https://xgboost.readthedocs.io/en/latest/build.html for installing XGBoost.

Related

Error "ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation." with Pyinstaller

Environment:
Windows 10
PyInstaller: 5.2
Python: 3.10.5
opencv-python 4.6.0.66
Problem:
I am trying to compile my Python code with PyInstaller. The exe is created and when I execute it, I get this error message:
Traceback (most recent call last):
File "PhoneBot.py", line 343, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "modules\prepare_envir_appium.py", line 24, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "modules\mymodulesteam.py", line 13, in <module>
File "C:\Users\gauth\AppData\Local\Temp\_MEI40002\cv2\__init__.py", line 181, in <module>
bootstrap()
File "C:\Users\gauth\AppData\Local\Temp\_MEI40002\cv2\__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "importlib\__init__.py", line 126, in import_module
File "C:\Users\gauth\AppData\Local\Temp\_MEI40002\cv2\__init__.py", line 181, in <module>
bootstrap()
File "C:\Users\gauth\AppData\Local\Temp\_MEI40002\cv2\__init__.py", line 76, in bootstrap
raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.
What did I try:
I deactivated my Antivirus.
It didn't work
I think I tried it all:
I installed the previous version of OpenCV:
pip install opencv-python==4.5.3.56
It didn't work
I installed the latest version:
pip install --upgrade opencv-python
pip install --upgrade pyinstaller
It didn't work
I tried to force the reinstallation:
pip3 install opencv-python --upgrade --force-reinstall
It didn't work
I added the path of cv2:
pyinstaller --onefile -F --uac-admin --icon="icon_PhoneBot_256.ico" --clean --noconsole --collect-data pyshadow --paths="C:\Users\gauth\AppData\Local\Programs\Python\Python310\Lib\site-packages\cv2" Project.py
It didn't work
Here are the logs of PyInstaller if it can help:
130 INFO: PyInstaller: 5.2
130 INFO: Python: 3.10.5
268 INFO: Platform: Windows-10-10.0.19044-SP0
269 INFO: wrote C:\Users\gauth\Documents\project\project_debug3\project.spec
275 INFO: UPX is not available.
275 INFO: Removing temporary files and cleaning cache in C:\Users\gauth\AppData\Local\pyinstaller
353 INFO: Extending PYTHONPATH with paths
['C:\\Users\\gauth\\Documents\\project\\project_debug3',
'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\cv2']
1144 INFO: checking Analysis
1144 INFO: Building Analysis because Analysis-00.toc is non existent
1146 INFO: Initializing module dependency graph...
1152 INFO: Caching module graph hooks...
1162 WARNING: Several hooks defined for module 'numpy'. Please take care they do not conflict.
1171 INFO: Analyzing base_library.zip ...
6500 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
6502 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib'
7762 INFO: Caching module dependency graph...
7923 INFO: running Analysis Analysis-00.toc
7940 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\Users\gauth\AppData\Local\Programs\Python\Python310\python.exe
8203 INFO: Analyzing C:\Users\gauth\Documents\project\project_debug3\project.py
9270 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
13260 INFO: Processing pre-find module path hook site from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
13262 INFO: site: retargeting to fake-dir 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\fake-modules'
22225 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
32496 INFO: Processing module hooks...
32501 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
32518 INFO: Loading module hook 'hook-Cryptodome.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
33041 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34553 INFO: Loading module hook 'hook-cv2.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34568 INFO: Loading module hook 'hook-google.api_core.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34571 INFO: Loading module hook 'hook-googleapiclient.model.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34647 WARNING: collect_data_files - skipping data collection for module 'googleapiclient.discovery' as it is not a package.
34648 INFO: Loading module hook 'hook-httplib2.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34657 INFO: Loading module hook 'hook-lxml.etree.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
34658 INFO: Loading module hook 'hook-lxml.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
35621 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
35622 INFO: Loading module hook 'hook-selenium.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
35985 INFO: Loading module hook 'hook-unidecode.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
37029 INFO: Loading module hook 'hook-numpy.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\numpy\\_pyinstaller'...
37120 INFO: Import to be excluded not found: 'f2py'
37133 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37138 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37139 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37144 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37742 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37749 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37806 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37812 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
37818 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
39392 WARNING: Hidden import "jinja2" not found!
39392 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
39494 INFO: Loading module hook 'hook-pandas.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
41173 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
41180 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
42001 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
42008 INFO: Loading module hook 'hook-PIL.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
42034 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
42044 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
43000 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
43424 WARNING: Hidden import "pkg_resources.py2_warn" not found!
43425 WARNING: Hidden import "pkg_resources.markers" not found!
43431 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
43436 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
43663 WARNING: Hidden import "sip" not found!
43663 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
43837 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
44120 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
44428 INFO: Loading module hook 'hook-pytz.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
44731 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
46244 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
46833 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
46839 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
47606 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
47607 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
47610 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
47611 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
47785 INFO: checking Tree
47785 INFO: Building Tree because Tree-00.toc is non existent
47787 INFO: Building Tree Tree-00.toc
47929 INFO: checking Tree
47930 INFO: Building Tree because Tree-01.toc is non existent
47932 INFO: Building Tree Tree-01.toc
48034 INFO: checking Tree
48034 INFO: Building Tree because Tree-02.toc is non existent
48036 INFO: Building Tree Tree-02.toc
48043 INFO: Loading module hook 'hook-lxml.isoschematron.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
48053 INFO: Loading module hook 'hook-lxml.objectify.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
48054 INFO: Loading module hook 'hook-pythoncom.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
48631 INFO: Loading module hook 'hook-pywintypes.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
49207 INFO: Loading module hook 'hook-win32com.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
49737 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks'...
49837 INFO: Looking for ctypes DLLs
50085 INFO: Analyzing run-time hooks ...
50106 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
50113 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
50120 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32api.py'
50121 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32comgenpy.py'
50123 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
50126 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
50130 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
50133 INFO: Including run-time hook 'C:\\Users\\gauth\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py'
50162 INFO: Looking for dynamic libraries
C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py:156: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
__import__(package)
54020 INFO: Looking for eggs
54021 INFO: Using Python library C:\Users\gauth\AppData\Local\Programs\Python\Python310\python310.dll
54023 INFO: Found binding redirects:
[]
54041 INFO: Warnings written to C:\Users\gauth\Documents\project\project_debug3\build\project\warn-project.txt
54297 INFO: Graph cross-reference written to C:\Users\gauth\Documents\project\project_debug3\build\project\xref-project.html
54366 INFO: Appending 'datas' from .spec
54373 INFO: checking PYZ
54373 INFO: Building PYZ because PYZ-00.toc is non existent
54375 INFO: Building PYZ (ZlibArchive) C:\Users\gauth\Documents\project\project_debug3\build\project\PYZ-00.pyz
56527 INFO: Building PYZ (ZlibArchive) C:\Users\gauth\Documents\project\project_debug3\build\project\PYZ-00.pyz completed successfully.
56577 INFO: checking PKG
56578 INFO: Building PKG because PKG-00.toc is non existent
56580 INFO: Building PKG (CArchive) project.pkg
86615 INFO: Building PKG (CArchive) project.pkg completed successfully.
86640 INFO: Bootloader C:\Users\gauth\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
86640 INFO: checking EXE
86640 INFO: Building EXE because EXE-00.toc is non existent
86641 INFO: Building EXE from EXE-00.toc
86643 INFO: Copying bootloader EXE to C:\Users\gauth\Documents\project\project_debug3\dist\project.exe.notanexecutable
86648 INFO: Copying icon to EXE
86653 INFO: Copying icons from ['C:\\Users\\gauth\\Documents\\project\\project_debug3\\icon_project_256.ico']
86654 INFO: Writing RT_GROUP_ICON 0 resource with 20 bytes
86654 INFO: Writing RT_ICON 1 resource with 14739 bytes
86657 INFO: Copying 0 resources to EXE
86657 INFO: Embedding manifest in EXE
86659 INFO: Updating manifest in C:\Users\gauth\Documents\project\project_debug3\dist\project.exe.notanexecutable
86660 INFO: Updating resource type 24 name 1 language 0
86663 INFO: Appending PKG archive to EXE
86763 INFO: Fixing EXE headers
87437 INFO: Building EXE from EXE-00.toc completed successfully.
Is there anyone who has any idea how to fix this issue?
The solution to the issues has been resolved, can check here if anyone faces same issues Github Pyinstaller
I had the same problem and it was solved by changing the OpenCV version
Exactly from version 4.6.0.66 to 4.5.5.64

Pyinstaller not working for package (pyreadstat)

I always have used pyinstaller to create executables files but now when on working on a older project I am facing some issues.
I have figured out that the main problem is while importing pyreadstat package. (pyreadstat is a python package to read spss files.)
import pyreadstat
Post running pyinstaller it first gives error for Module not found pandas. To resolve this I added --hidden-import pandas then it gave another error about Module not found pyreadstat._readstat_writer.
Once I added that as hidden import I got Module not found worker.
I am now not sure why pyinstaller is behaving in this way. Earlier it used to work correctly.
Can someone provider their input here. Below is the cmd log for reference.
D:\Projects\Test>pyinstaller --onefile test.py
62 INFO: PyInstaller: 4.1
62 INFO: Python: 3.9.1
62 INFO: Platform: Windows-10-10.0.19041-SP0
62 INFO: wrote D:\Projects\Test\test.spec
62 INFO: UPX is not available.
69 INFO: Extending PYTHONPATH with paths
['D:\\Projects\\Test', 'D:\\Projects\\Test']
69 INFO: checking Analysis
69 INFO: Building Analysis because Analysis-00.toc is non existent
69 INFO: Initializing module dependency graph...
69 INFO: Caching module graph hooks...
85 INFO: Analyzing base_library.zip ...
1941 INFO: Processing pre-find module path hook distutils from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
1941 INFO: distutils: retargeting to non-venv dir 'c:\\program files\\python39\\lib'
3458 INFO: Caching module dependency graph...
3552 INFO: running Analysis Analysis-00.toc
3552 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\program files\python39\python.exe
3599 WARNING: lib not found: api-ms-win-core-path-l1-1-0.dll dependency of c:\program files\python39\python39.dll
3615 INFO: Analyzing D:\Projects\Test\test.py
3630 INFO: Processing module hooks...
3630 INFO: Loading module hook 'hook-difflib.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3630 INFO: Excluding import of doctest from module difflib
3630 INFO: Loading module hook 'hook-distutils.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3630 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3630 INFO: Excluding import of lib2to3.refactor from module distutils.util
3630 INFO: Loading module hook 'hook-encodings.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3703 INFO: Loading module hook 'hook-heapq.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3703 INFO: Excluding import of doctest from module heapq
3703 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3828 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3828 INFO: Excluding import of test.support from module multiprocessing.util
3828 INFO: Excluding import of test from module multiprocessing.util
3844 INFO: Loading module hook 'hook-pickle.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3844 INFO: Excluding import of argparse from module pickle
3844 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3844 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3844 INFO: Loading module hook 'hook-xml.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
3891 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks'...
4006 INFO: checking Tree
4006 INFO: Building Tree because Tree-00.toc is non existent
4021 INFO: Building Tree Tree-00.toc
4085 INFO: checking Tree
4085 INFO: Building Tree because Tree-01.toc is non existent
4085 INFO: Building Tree Tree-01.toc
4180 INFO: checking Tree
4180 INFO: Building Tree because Tree-02.toc is non existent
4180 INFO: Building Tree Tree-02.toc
4196 INFO: Looking for ctypes DLLs
4211 INFO: Analyzing run-time hooks ...
4211 INFO: Including run-time hook 'c:\\program files\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
4211 INFO: Looking for dynamic libraries
4446 INFO: Looking for eggs
4446 INFO: Using Python library c:\program files\python39\python39.dll
4446 INFO: Found binding redirects:
[]
4446 INFO: Warnings written to D:\Projects\Test\build\test\warn-test.txt
4477 INFO: Graph cross-reference written to D:\Projects\Test\build\test\xref-test.html
4524 INFO: checking PYZ
4524 INFO: Building PYZ because PYZ-00.toc is non existent
4524 INFO: Building PYZ (ZlibArchive) D:\Projects\Test\build\test\PYZ-00.pyz
4883 INFO: Building PYZ (ZlibArchive) D:\Projects\Test\build\test\PYZ-00.pyz completed successfully.
4899 INFO: checking PKG
4899 INFO: Building PKG because PKG-00.toc is non existent
4899 INFO: Building PKG (CArchive) PKG-00.pkg
6528 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
6528 INFO: Bootloader c:\program files\python39\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
6528 INFO: checking EXE
6528 INFO: Building EXE because EXE-00.toc is non existent
6528 INFO: Building EXE from EXE-00.toc
6528 INFO: Appending archive to EXE D:\Projects\Test\dist\test.exe
6700 INFO: Building EXE from EXE-00.toc completed successfully.
D:\Projects\Test>cd dist
D:\Projects\Test\dist>test.exe
Traceback (most recent call last):
File "test.py", line 1, in <module>
File "c:\program files\python39\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "pyreadstat\__init__.py", line 17, in <module>
File "pyreadstat\pyreadstat.pyx", line 1, in init pyreadstat.pyreadstat
File "pyreadstat\_readstat_parser.pyx", line 28, in init pyreadstat._readstat_parser
ModuleNotFoundError: No module named 'pandas'
[10584] Failed to execute script test

cannot run pyinstaller executable of a flask server. ValueError: Can't find a dictionary for language 'ru'

I'm trying to put a simple flask server into executable by using pyinstaller -F server.py command
When running the exe file, I obtain the following error:
Traceback (most recent call last):
File "server.py", line 4, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\users\pc\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "transform.py", line 17, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "c:\users\pc\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "convert.py", line 12, in <module>
File "pymorphy2\analyzer.py", line 200, in __init__
File "pymorphy2\analyzer.py", line 280, in choose_dictionary_path
File "pymorphy2\analyzer.py", line 144, in lang_dict_path
ValueError: Can't find a dictionary for language 'ru'. Installed languages: []. Try installing pymorphy2-dicts-ru package.
[18156] Failed to execute script server
Already tried to pip install pymorphy2-dicts-ru, it didn't help
Below are the logs of pyinstaller -F server.py
96 INFO: PyInstaller: 4.1
97 INFO: Python: 3.6.8
97 INFO: Platform: Windows-10-10.0.19041-SP0
103 INFO: wrote C:\Users\pc\Desktop\hack\code\nlp-server\server.spec
118 INFO: UPX is not available.
122 INFO: Extending PYTHONPATH with paths
['C:\\Users\\pc\\Desktop\\hack\\code\\nlp-server',
'C:\\Users\\pc\\Desktop\\hack\\code\\nlp-server']
139 INFO: checking Analysis
140 INFO: Building Analysis because Analysis-00.toc is non existent
140 INFO: Initializing module dependency graph...
145 INFO: Caching module graph hooks...
169 INFO: Analyzing base_library.zip ...
3178 INFO: Caching module dependency graph...
3265 INFO: running Analysis Analysis-00.toc
3268 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\pc\appdata\local\programs\python\python36\python.exe
3440 INFO: Analyzing C:\Users\pc\Desktop\hack\code\nlp-server\server.py
4658 INFO: Processing pre-find module path hook distutils from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
4659 INFO: distutils: retargeting to non-venv dir 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib'
7000 INFO: Processing pre-safe import module hook setuptools.extern.six.moves from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.m
oves.py'.
7477 INFO: Processing pre-find module path hook site from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
7478 INFO: site: retargeting to fake-dir 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\fake-modules'
10016 INFO: Processing module hooks...
10017 INFO: Loading module hook 'hook-jinja2.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
10031 INFO: Loading module hook 'hook-difflib.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10034 INFO: Excluding import of doctest from module difflib
10034 INFO: Loading module hook 'hook-distutils.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10035 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10038 INFO: Excluding import of lib2to3.refactor from module distutils.util
10038 INFO: Loading module hook 'hook-encodings.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10146 INFO: Loading module hook 'hook-heapq.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10148 INFO: Excluding import of doctest from module heapq
10149 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10247 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10249 INFO: Import to be excluded not found: 'test'
10249 INFO: Loading module hook 'hook-numpy.core.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10827 INFO: Loading module hook 'hook-numpy.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10830 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10832 INFO: Excluding import of pytest from module numpy._pytesttester
10833 INFO: Loading module hook 'hook-pickle.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
10835 INFO: Excluding import of argparse from module pickle
10835 INFO: Loading module hook 'hook-pkg_resources.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
11162 INFO: Processing pre-safe import module hook win32com from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'win32com'
11219 INFO: Processing pre-safe import module hook win32com from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'win32com'
11462 WARNING: Hidden import "pkg_resources.py2_warn" not found!
11464 WARNING: Hidden import "pkg_resources.markers" not found!
11465 INFO: Excluding import of __main__ from module pkg_resources
11466 INFO: Loading module hook 'hook-setuptools.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
12062 INFO: Excluding import of setuptools.py27compat from module setuptools.command.easy_install
12062 INFO: Excluding import of setuptools.py27compat from module setuptools.package_index
12065 INFO: Excluding import of setuptools.py33compat from module setuptools.depends
12065 INFO: Excluding import of setuptools.py33compat from module setuptools.package_index
12066 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
12067 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
12068 INFO: Loading module hook 'hook-xml.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
12121 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks'...
12123 INFO: Excluding import of numpy from module setuptools.msvc
12199 INFO: Looking for ctypes DLLs
12231 INFO: Analyzing run-time hooks ...
12237 INFO: Including run-time hook 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
12238 INFO: Including run-time hook 'c:\\users\\pc\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
12250 INFO: Looking for dynamic libraries
13139 INFO: Looking for eggs
13139 INFO: Using Python library c:\users\pc\appdata\local\programs\python\python36\python36.dll
13139 INFO: Found binding redirects:
[]
13150 INFO: Warnings written to C:\Users\pc\Desktop\hack\code\nlp-server\build\server\warn-server.txt
13296 INFO: Graph cross-reference written to C:\Users\pc\Desktop\hack\code\nlp-server\build\server\xref-server.html
13324 INFO: checking PYZ
13325 INFO: Building PYZ because PYZ-00.toc is non existent
13326 INFO: Building PYZ (ZlibArchive) C:\Users\pc\Desktop\hack\code\nlp-server\build\server\PYZ-00.pyz
14479 INFO: Building PYZ (ZlibArchive) C:\Users\pc\Desktop\hack\code\nlp-server\build\server\PYZ-00.pyz completed successfully.
14505 INFO: checking PKG
14505 INFO: Building PKG because PKG-00.toc is non existent
14505 INFO: Building PKG (CArchive) PKG-00.pkg
20039 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
20043 INFO: Bootloader c:\users\pc\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
20043 INFO: checking EXE
20043 INFO: Building EXE because EXE-00.toc is non existent
20043 INFO: Building EXE from EXE-00.toc
20044 INFO: Appending archive to EXE C:\Users\pc\Desktop\hack\code\nlp-server\dist\server.exe
20060 INFO: Building EXE from EXE-00.toc completed successfully.
code of the server.py
from flask import Flask, request, jsonify
from transform import transform_text
server = Flask(__name__);
#server.route('/send', methods=['POST'])
def send():
print("POST /send request")
# obtaining passed args
fname = request.json['fname']
text = request.json['text']
# updating the text
text = f"{transform_text(text, 'Masc', fname)}"
# sending back updated text
return jsonify({'text': text})
if __name__ == '__main__':
server.run(host='0.0.0.0', port='8080', debug=True)
tranform_text() function uses pymorphy to change sentences from 1st person form ("I play") to 3rd person form("He/She plays")
So, is there any way to make the executable work?
This is the problem of the package ;pymorphy2_dicts_ru;. Files from the data directory are not copied to the bundle.
To solve the problem, you need to perform two steps:
Add the data directory to the pyinstaller spec file:
...
# pymorph data
import pymorphy2_dicts_ru
pymorph_data = pymorphy2_dicts_ru.get_path()
a = Analysis(['main.py'],
pathex=['.'],
binaries=[],
datas=[(pymorph_data, 'pymorphy2_dicts_ru/data')],
hiddenimports=[],
hookspath=[],
...
Set the path to the data directory in the code before import the pymorphy2 module (to main.py for example):
...
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
os.environ["PYMORPHY2_DICT_PATH"] = str(pathlib.Path(sys._MEIPASS).joinpath('pymorphy2_dicts_ru/data'))
...

Reducing .exe file using virtual environment

I am quite new to Python (and programming in general to be frank), and am using pyinstaller to create a .exe file from a .py file. After a few trials I figured that pyinstaller is including many unnecessary libraries such as scipy which is making my file extremely big.
To get around that I made a virtual environment and installed the modules I needed. However, when I tried making the .exe while still in the venv using pyinstaller -w -F -i "iconpath" filename.py its not working (it just stops after the last line in the code below):
126 INFO: PyInstaller: 3.6
126 INFO: Python: 3.8.1
127 INFO: Platform: Windows-10-10.0.16299-SP0
128 INFO: wrote C:\Users\26039190\RefCal_v4\RefCal_v4.spec
131 INFO: UPX is not available.
139 INFO: Extending PYTHONPATH with paths
['C:\\Users\\26039190\\RefCal_v4', 'C:\\Users\\26039190\\RefCal_v4']
139 INFO: checking Analysis
139 INFO: Building Analysis because Analysis-00.toc is non existent
139 INFO: Initializing module dependency graph...
143 INFO: Caching module graph hooks...
153 INFO: Analyzing base_library.zip ...
5696 INFO: Processing pre-find module path hook distutils
5697 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\26039190\\AppData\\Local\\Programs\\Python\\Python38-32\\lib'
9412 INFO: Caching module dependency graph...
9565 INFO: running Analysis Analysis-00.toc
9570 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\26039190\env\scripts\python.exe
9601 INFO: Analyzing C:\Users\26039190\RefCal_v4\RefCal_v4.py
13180 INFO: Processing pre-find module path hook site
13181 INFO: site: retargeting to fake-dir 'c:\\users\\26039190\\env\\lib\\site-packages\\PyInstaller\\fake-modules'
14909 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
21403 INFO: Processing pre-safe import module hook six.moves
122612 INFO: Processing module hooks...
122615 INFO: Loading module hook "hook-distutils.py"...
122622 INFO: Loading module hook "hook-encodings.py"...
122840 INFO: Loading module hook "hook-lib2to3.py"...
122846 INFO: Loading module hook "hook-matplotlib.backends.py"...
124362 INFO: Matplotlib backend "GTK3Agg": ignored
backend Gtk3Agg requires cairo
124925 INFO: Matplotlib backend "GTK3Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
125538 INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx' from 'matplotlib.backends' (c:\users\26039190\env\lib\site-packages\matplotlib\backends\__init__.py)
126226 INFO: Matplotlib backend "nbAgg": ignored
No module named 'IPython'
127194 INFO: Matplotlib backend "Qt4Agg": added
128011 INFO: Matplotlib backend "Qt4Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
128802 INFO: Matplotlib backend "Qt5Agg": added
129303 INFO: Matplotlib backend "Qt5Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
130180 INFO: Matplotlib backend "TkAgg": added
131163 INFO: Matplotlib backend "TkCairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
131845 INFO: Matplotlib backend "WebAgg": ignored
Traceback (most recent call last):
File "c:\users\26039190\env\lib\site-packages\matplotlib\backends\backend_webagg.py", line 27, in <module>
import tornado
ModuleNotFoundError: No module named 'tornado'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\users\26039190\env\lib\site-packages\matplotlib\backends\backend_webagg.py", line 29, in <module>
raise RuntimeError("The WebAgg backend requires Tornado.")
RuntimeError: The WebAgg backend requires Tornado.
132610 INFO: Matplotlib backend "WX": ignored
No module named 'wx'
133240 INFO: Matplotlib backend "WXAgg": ignored
No module named 'wx'
133885 INFO: Matplotlib backend "WXCairo": ignored
No module named 'wx'
134389 INFO: Matplotlib backend "agg": added
135129 INFO: Matplotlib backend "cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
136202 INFO: Matplotlib backend "pdf": added
136913 INFO: Matplotlib backend "pgf": added
137455 INFO: Matplotlib backend "ps": added
138036 INFO: Matplotlib backend "svg": added
138739 INFO: Matplotlib backend "template": added
139367 INFO: Loading module hook "hook-matplotlib.py"...
139836 INFO: Loading module hook "hook-numpy.core.py"...
140027 INFO: Loading module hook "hook-numpy.py"...
140031 INFO: Loading module hook "hook-pkg_resources.py"...
140710 INFO: Processing pre-safe import module hook win32com
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'win32com'
140839 INFO: Processing pre-safe import module hook win32com
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'win32com'
140954 INFO: Excluding import '__main__'
140957 INFO: Removing import of __main__ from module pkg_resources
140966 INFO: Loading module hook "hook-pydoc.py"...
140976 INFO: Loading module hook "hook-PyQt5.py"...
Can anyone please shed some light?
By the way I am using anaconda, could that be the problem? Some people say I should uninstall anaconda, but I do not want to delete anaconda since I use Jupyter and Spyder quite a lot
Thank you everyone
collections is included in The Python Standard Library, no need to install it.

matplotlib qt5agg backend segmentation fault occurs after building distributable with pyinstaller

I'm building a GUI distributable using pyqt5, which shows a matplotlib plot in a popup window as the result. It works fine as a python code, but after building it into a binary via pyinstaller, it throws a segmentation fault when the button for creating the popup window that incorporates matplotlib is clicked.
It is run on Linux with Python 3.7 and Pyinstaller 3.5. All of the other functions are working fine except for the plotting part, and after a few trials I managed to find out that the popup window generation works fine, and that the segmentation fault is evoked when the FigureCanvasQt5Agg function is called. I tried to use gdb/faulthandler to trace the fault but wasn't able to since the fault occurs only for the distributable (correct me if I'm wrong).
Below is the stripped code:
from PyQt5 import QtCore, QtGui, QtWidgets
import matplotlib
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
class Ui_PMI_init(object):
def setupUi(self, PMI_init):
PMI_init.setObjectName("PMI_init")
PMI_init.resize(1113, 500)
self.centralwidget = QtWidgets.QWidget(PMI_init)
self.centralwidget.setObjectName("centralwidget")
self.btn_resultwin = QtWidgets.QPushButton(self.centralwidget)
self.btn_resultwin.setObjectName("btn_resultwin")
self.btn_resultwin.clicked.connect(self.resultWindow)
PMI_init.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(PMI_init)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1113, 21))
self.menubar.setObjectName("menubar")
PMI_init.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(PMI_init)
self.statusbar.setObjectName("statusbar")
PMI_init.setStatusBar(self.statusbar)
# Edit layout of the widgets
self.vbox_whole = QtWidgets.QVBoxLayout()
self.vbox_whole.addWidget(self.btn_resultwin)
self.centralwidget.setLayout(self.vbox_whole)
self.retranslateUi(PMI_init)
QtCore.QMetaObject.connectSlotsByName(PMI_init)
def retranslateUi(self, PMI_init):
_translate = QtCore.QCoreApplication.translate
PMI_init.setWindowTitle(_translate("PMI_init", "PMI Input Information"))
self.btn_resultwin.setText(_translate("PMI_init", "Show Results"))
def resultWindow(self,PMI_init):
self.winTable = showResultWindow()
self.winTable.show()
class showResultWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.title = "Result Summary"
self.top = 150
self.left = 300
self.width = 870
self.height = 500
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
self.newUI()
def newUI(self):
self.fig = matplotlib.figure.Figure()
self.canvas = FigureCanvas(self.fig)
self.plot_layout = QtWidgets.QHBoxLayout()
self.plot_layout.addWidget(self.canvas)
self.result_grid = QtWidgets.QGridLayout()
self.table_rlabel1 = QtWidgets.QLabel()
self.table_rlabel2 = QtWidgets.QLabel()
self.table_rlabel3 = QtWidgets.QLabel()
self.table_rlabel4 = QtWidgets.QLabel()
self.table_rlabel5 = QtWidgets.QLabel()
self.table_rlabel1.setText('new')
self.table_rlabel2.setText('sum')
self.table_rlabel3.setText('new all')
self.table_rlabel4.setText('all')
self.table_rlabel5.setText('(%)')
self.result_grid.addWidget(self.table_rlabel1,0,1)
self.result_grid.addWidget(self.table_rlabel2,0,2)
self.result_grid.addWidget(self.table_rlabel3,0,3)
self.result_grid.addWidget(self.table_rlabel4,0,4)
self.result_grid.addWidget(self.table_rlabel5,0,5)
self.vbox = QtWidgets.QVBoxLayout()
self.vbox.addLayout(self.plot_layout)
self.vbox.addLayout(self.result_grid)
self.vbox.setStretchFactor(self.plot_layout,1)
self.vbox.setStretchFactor(self.result_grid,0)
self.setLayout(self.vbox)
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
PMI_init = QtWidgets.QMainWindow()
ui = Ui_PMI_init()
ui.setupUi(PMI_init)
PMI_init.show()
sys.exit(app.exec_())
Also sharing the pyinstaller log, because some warnings and "excludes" occurr, which might be affecting the current status.
206 INFO: PyInstaller: 3.5
206 INFO: Python: 3.7.3
208 INFO: Platform: Linux-2.6.32-696.el6.x86_64-x86_64-with-redhat-6.6-Santiago
212 INFO: wrote /user/neonbadak/002.GUIDevelopment/code/segfault_strippedcode.spec
219 INFO: UPX is not available.
226 INFO: Extending PYTHONPATH with paths
['/user/neonbadak/002.GUIDevelopment/code',
'/user/neonbadak/002.GUIDevelopment/code']
226 INFO: checking Analysis
321 INFO: Building because /user/neonbadak/002.GUIDevelopment/code/segfault_strippedcode.py changed
322 INFO: Initializing module dependency graph...
342 INFO: Initializing module graph hooks...
349 INFO: Analyzing base_library.zip ...
7839 INFO: running Analysis Analysis-00.toc
7858 INFO: Caching module hooks...
7865 INFO: Analyzing /user/neonbadak/002.GUIDevelopment/code/segfault_strippedcode.py
8433 INFO: Processing pre-find module path hook distutils
12072 INFO: Processing pre-safe import module hook six.moves
17828 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
19177 INFO: Processing pre-find module path hook site
19181 INFO: site: retargeting to fake-dir '/user/neonbadak/anaconda3/lib/python3.7/site-packages/PyInstaller-3.5-py3.7.egg/PyInstaller/fake-modules'
49655 INFO: Processing pre-safe import module hook urllib3.packages.six.moves
92475 INFO: Loading module hooks...
92476 INFO: Loading module hook "hook-sphinx.py"...
/user/neonbadak/anaconda3/lib/python3.7/site-packages/sphinx/websupport/__init__.py:25: RemovedInSphinx20Warning: sphinx.websupport module is now provided as sphinxcontrib-websupport. sphinx.websupport will be removed at Sphinx-2.0. Please use the package instead.
RemovedInSphinx20Warning)
102618 INFO: Loading module hook "hook-xml.dom.domreg.py"...
102621 INFO: Loading module hook "hook-sqlalchemy.py"...
103064 INFO: Found 4 sqlalchemy hidden imports
103066 WARNING: Hidden import "MySQLdb" not found!
103067 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found!
103101 INFO: Excluding import 'sqlalchemy.testing'
103112 INFO: Removing import of sqlalchemy.testing.util from module sqlalchemy.orm.util
103113 INFO: Removing import of sqlalchemy.testing.util from module sqlalchemy.testing
103113 INFO: Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing
103113 INFO: Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing
103113 INFO: Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing.config from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing.warnings from module sqlalchemy.testing
103114 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.config
103114 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.mock
103115 INFO: Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.assertions
103115 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertsql
103116 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.util
103116 INFO: Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.util
103116 INFO: Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing.util
103116 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.engines
103116 INFO: Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.engines
103116 INFO: Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.engines
103117 INFO: Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.engines
103120 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.exclusions
103120 INFO: Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.exclusions
103120 INFO: Removing import of sqlalchemy.testing from module sqlalchemy.testing.warnings
103120 INFO: Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.warnings
103121 INFO: Loading module hook "hook-nbformat.py"...
103152 INFO: Loading module hook "hook-sqlite3.py"...
103265 INFO: Loading module hook "hook-IPython.py"...
103323 INFO: Excluding import 'gtk'
103332 INFO: Excluding import 'PyQt4'
103339 INFO: Removing import of PyQt4 from module IPython.external.qt_loaders
103340 INFO: Excluding import 'PyQt5'
103346 INFO: Removing import of PyQt5.QtCore from module IPython.external.qt_loaders
103346 INFO: Removing import of PyQt5 from module IPython.external.qt_loaders
103346 INFO: Removing import of PyQt5.QtSvg from module IPython.external.qt_loaders
103346 INFO: Removing import of PyQt5.QtGui from module IPython.external.qt_loaders
103347 INFO: Removing import of PyQt5.QtWidgets from module IPython.external.qt_loaders
103347 INFO: Excluding import 'PySide'
103353 INFO: Removing import of PySide from module IPython.external.qt_loaders
103354 INFO: Excluding import 'matplotlib'
103360 INFO: Removing import of matplotlib from module IPython.core.pylabtools
103360 INFO: Removing import of matplotlib.figure from module IPython.core.pylabtools
103360 INFO: Removing import of matplotlib._pylab_helpers from module IPython.core.pylabtools
103360 INFO: Removing import of matplotlib.pyplot from module IPython.core.pylabtools
103362 INFO: Loading module hook "hook-numpy.py"...
103364 INFO: Loading module hook "hook-PyQt5.py"...
120445 WARNING: Hidden import "PyQt5.sip" not found!
120445 INFO: Loading module hook "hook-matplotlib.py"...
121063 INFO: Loading module hook "hook-notebook.py"...
124324 INFO: Loading module hook "hook-PyQt5.QtSvg.py"...
124614 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
124670 INFO: Loading module hook "hook-lxml.etree.py"...
124673 INFO: Loading module hook "hook-PIL.py"...
124681 INFO: Excluding import 'tkinter'
124684 INFO: Import to be excluded not found: 'FixTk'
124684 INFO: Excluding import 'PyQt4'
124687 INFO: Removing import of PyQt4 from module PIL.ImageQt
124687 INFO: Excluding import 'PyQt5'
124690 INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt
124690 INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt
124690 INFO: Excluding import 'PySide'
124693 INFO: Removing import of PySide from module PIL.ImageQt
124693 INFO: Loading module hook "hook-pydoc.py"...
124695 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
124696 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
124900 INFO: Loading module hook "hook-lib2to3.py"...
124919 INFO: Loading module hook "hook-nbconvert.py"...
124986 INFO: Loading module hook "hook-pytz.py"...
125226 INFO: Loading module hook "hook-xml.py"...
125228 INFO: Loading module hook "hook-pygments.py"...
127436 INFO: Loading module hook "hook-matplotlib.backends.py"...
128523 INFO: Matplotlib backend "GTK3Agg": ignored
cairo backend requires that cairocffi or pycairo is installed
129194 INFO: Matplotlib backend "GTK3Cairo": ignored
cairo backend requires that cairocffi or pycairo is installed
129906 INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx' from 'matplotlib.backends' (/user/neonbadak/anaconda3/lib/python3.7/site-packages/matplotlib/backends/__init__.py)
132630 INFO: Matplotlib backend "nbAgg": added
133658 INFO: Matplotlib backend "Qt4Agg": added
134318 INFO: Matplotlib backend "Qt4Cairo": ignored
cairo backend requires that cairocffi or pycairo is installed
135049 INFO: Matplotlib backend "Qt5Agg": added
135706 INFO: Matplotlib backend "Qt5Cairo": ignored
cairo backend requires that cairocffi or pycairo is installed
136394 INFO: Matplotlib backend "TkAgg": added
137189 INFO: Matplotlib backend "TkCairo": ignored
cairo backend requires that cairocffi or pycairo is installed
137832 INFO: Matplotlib backend "WebAgg": added
138709 INFO: Matplotlib backend "WX": ignored
No module named 'wx'
139170 INFO: Matplotlib backend "WXAgg": ignored
No module named 'wx'
139827 INFO: Matplotlib backend "WXCairo": ignored
No module named 'wx'
140282 INFO: Matplotlib backend "agg": added
141105 INFO: Matplotlib backend "cairo": ignored
cairo backend requires that cairocffi or pycairo is installed
141834 INFO: Matplotlib backend "pdf": added
142716 INFO: Matplotlib backend "pgf": added
143179 INFO: Matplotlib backend "ps": added
143851 INFO: Matplotlib backend "svg": added
144603 INFO: Matplotlib backend "template": added
145066 INFO: Loading module hook "hook-pycparser.py"...
145069 INFO: Loading module hook "hook-sysconfig.py"...
145085 INFO: Loading module hook "hook-babel.py"...
145349 INFO: Loading module hook "hook-zmq.py"...
147784 INFO: Loading module hook "hook-cryptography.py"...
148313 INFO: Loading module hook "hook-distutils.py"...
148317 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
148445 INFO: Loading module hook "hook-certifi.py"...
148449 INFO: Loading module hook "hook-scipy.py"...
148452 INFO: Loading module hook "hook-jsonschema.py"...
148465 INFO: Loading module hook "hook-pkg_resources.py"...
149651 INFO: Processing pre-safe import module hook win32com
149932 INFO: Loading module hook "hook-_tkinter.py"...
150165 INFO: checking Tree
150243 INFO: checking Tree
150301 INFO: Loading module hook "hook-pytest.py"...
152414 INFO: Loading module hook "hook-setuptools.py"...
153990 INFO: Loading module hook "hook-docutils.py"...
156694 INFO: Loading module hook "hook-jedi.py"...
156758 INFO: Loading module hook "hook-encodings.py"...
156917 INFO: Loading module hook "hook-PIL.Image.py"...
157844 INFO: Loading module hook "hook-jinja2.py"...
157868 INFO: Loading module hook "hook-numpy.core.py"...
158059 INFO: MKL libraries found when importing numpy. Adding MKL to binaries
158072 INFO: Loading module hook "hook-gevent.py"...
158411 INFO: Determining a mapping of distributions to packages...
368388 WARNING: Unable to find package for requirement greenlet from package gevent.
368388 INFO: Packages required by gevent:
[]
371351 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
371359 INFO: Excluding import 'tkinter'
371362 INFO: Import to be excluded not found: 'FixTk'
371489 INFO: checking Tree
371811 INFO: Looking for ctypes DLLs
372140 WARNING: library user32 required via ctypes not found
373074 INFO: Analyzing run-time hooks ...
373117 INFO: Including run-time hook 'pyi_rth_traitlets.py'
373124 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
373130 INFO: Including run-time hook 'pyi_rth__tkinter.py'
373133 INFO: Including run-time hook 'pyi_rth_pkgres.py'
373136 INFO: Including run-time hook 'pyi_rth_certifi.py'
373139 INFO: Including run-time hook 'pyi_rth_mplconfig.py'
373141 INFO: Including run-time hook 'pyi_rth_mpldata.py'
373143 INFO: Including run-time hook 'pyi_rth_pyqt5.py'
373208 INFO: Looking for dynamic libraries
ldd: Warning: (sth written in Korean) `/user/neonbadak/anaconda3/plugins/platforms/../../lib/libgcc_s.so.1'
378343 INFO: Looking for eggs
378343 INFO: Python library not in binary dependencies. Doing additional searching...
378366 INFO: Using Python library /user/neonbadak/anaconda3/lib/libpython3.7m.so
378423 INFO: Warnings written to /user/neonbadak/002.GUIDevelopment/code/build/segfault_strippedcode/warn-segfault_strippedcode.txt
378773 INFO: Graph cross-reference written to /user/neonbadak/002.GUIDevelopment/code/build/segfault_strippedcode/xref-segfault_strippedcode.html
379184 INFO: checking PYZ
379213 INFO: Building because toc changed
379213 INFO: Building PYZ (ZlibArchive) /user/neonbadak/002.GUIDevelopment/code/build/segfault_strippedcode/PYZ-00.pyz
383447 INFO: Building PYZ (ZlibArchive) /user/neonbadak/002.GUIDevelopment/code/build/segfault_strippedcode/PYZ-00.pyz completed successfully.
383576 INFO: checking PKG
383577 INFO: Building because toc changed
383577 INFO: Building PKG (CArchive) PKG-00.pkg
383699 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
383703 INFO: Bootloader /user/neonbadak/anaconda3/lib/python3.7/site-packages/PyInstaller-3.5-py3.7.egg/PyInstaller/bootloader/Linux-64bit/run
383703 INFO: checking EXE
383705 INFO: Building because toc changed
383705 INFO: Building EXE from EXE-00.toc
383720 INFO: Appending archive to ELF section in EXE /user/neonbadak/002.GUIDevelopment/code/build/segfault_strippedcode/segfault_strippedcode
383911 INFO: Building EXE from EXE-00.toc completed successfully.
383951 INFO: checking COLLECT
384002 INFO: Building COLLECT COLLECT-00.toc
433891 INFO: Building COLLECT COLLECT-00.toc completed successfully.
I expect the distributable to work in the same manner as the original code, without the segmentation error. Any help/hints on how to solve this issue directly or tracking down the fault itself would be greatly appreciated.

Categories