Pyinstaller not finding pandas hook - python

I have written a simple python script that I am now trying to make an exe file. Whenever I try to run the resulting exe, the program fails at import pandas and I get the following error.
Traceback (most recent call last):
File "myProgram.py", line 14, in <module>
import pandas
File "c:\temp\pip-install-k4pegh\pyInstaller\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
File "site-packages\pandas\__init__.py", line 35, in <module>
ImportError: C extension: No module named tslib not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
[492] Failed to execute script myProgram
Looking at the cmd output, hook-pandas is loaded. So this is not an issue with pyinstaller finding the pandas hook.
30240 INFO: Loading module hook "hook-pkg_resources.py"...
30568 INFO: Processing pre-safe import module hook win32com
31036 INFO: Loading module hook "hook-pytz.py"...
31286 INFO: Loading module hook "hook-pywintypes.py"...
31550 INFO: Loading module hook "hook-setuptools.py"...
31644 INFO: Loading module hook "hook-encodings.py"...
33516 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
33516 INFO: Loading module hook "hook-numpy.core.py"...
33609 INFO: Loading module hook "hook-sqlite3.py"...
33796 INFO: Loading module hook "hook-pandas.py"...
33812 INFO: Loading module hook "hook-win32com.py"...
34779 INFO: Loading module hook "hook-pythoncom.py"...
35217 INFO: Analyzing run-time hooks ...
35231 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
35247 INFO: Including run-time hook 'pyi_rth__tkinter.py'
35263 INFO: Including run-time hook 'pyi_rth_pkgres.py'
35279 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
I did have to add pandas-hook to Python27\Lib\site-packages\PyInstaller\hooks myself. See No module named 'pandas._libs.tslibs.timedeltas' in PyInstaller and https://github.com/lneuhaus/pyinstaller/commit/017b247064f9bd51a620cfb2172c05d63fc75133. Could that be a problem?
Earlier I also tried altering the spec file based on this question, PyInstaller and Pandas, with no luck.
Using:
python 2.7
pyinstaller 3.3.1
pandas 0.22.0.
If anyone knows why pyinstaller can't use a loaded hook or has any ideas as to what to try next, I would really appreciate it.

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

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.
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.

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.

How to use pyinstaller with pipenv / pyenv

I am trying to ship an executable from my python script which lives inside a virtual environment using pipenv which again relies on pyenv for python versioning. For that, I want to us pyinstaller.
What I did:
pipenv install pyinstaller
pyinstaller --onefile my_script.py
Output:
40 INFO: PyInstaller: 3.5
40 INFO: Python: 3.6.9
41 INFO: Platform: Linux-4.15.0-65-generic-x86_64-with-debian-stretch-sid
42 INFO: wrote /home/matthaeus/cybathlon/planvec/qt_video_gui_example.spec
44 INFO: UPX is not available.
45 INFO: Extending PYTHONPATH with paths
['/home/matthaeus/cybathlon/planvec', '/home/matthaeus/cybathlon/planvec']
45 INFO: checking Analysis
45 INFO: Building Analysis because Analysis-00.toc is non existent
45 INFO: Initializing module dependency graph...
46 INFO: Initializing module graph hooks...
47 INFO: Analyzing base_library.zip ...
2786 INFO: running Analysis Analysis-00.toc
2801 INFO: Caching module hooks...
2805 INFO: Analyzing /home/matthaeus/cybathlon/planvec/qt_video_gui_example.py
3284 INFO: Processing pre-find module path hook distutils
3285 INFO: distutils: retargeting to non-venv dir '/home/matthaeus/.pyenv/versions/3.6.9/lib/python3.6/distutils/__init__.py'
3972 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
4336 INFO: Processing pre-find module path hook site
4337 INFO: site: retargeting to fake-dir '/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/fake-modules'
6327 INFO: Loading module hooks...
6328 INFO: Loading module hook "hook-numpy.core.py"...
6458 INFO: Loading module hook "hook-sysconfig.py"...
6464 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
6534 INFO: Loading module hook "hook-scipy.py"...
6535 INFO: Loading module hook "hook-PyQt5.py"...
6549 WARNING: Hidden import "sip" not found!
6549 INFO: Loading module hook "hook-pkg_resources.py"...
6788 INFO: Processing pre-safe import module hook win32com
7015 INFO: Loading module hook "hook-numpy.py"...
7015 INFO: Loading module hook "hook-cv2.py"...
7016 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
7048 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
7096 INFO: Loading module hook "hook-pydoc.py"...
7097 INFO: Loading module hook "hook-xml.py"...
7150 INFO: Loading module hook "hook-encodings.py"...
7203 INFO: Loading module hook "hook-setuptools.py"...
7423 WARNING: Hidden import "distutils.command.build_ext" not found!
7680 INFO: Looking for ctypes DLLs
7762 INFO: Analyzing run-time hooks ...
7769 INFO: Including run-time hook 'pyi_rth_pyqt5.py'
7770 INFO: Including run-time hook 'pyi_rth_pkgres.py'
7771 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
7785 INFO: Looking for dynamic libraries
9784 INFO: Looking for eggs
9784 INFO: Python library not in binary dependencies. Doing additional searching...
Traceback (most recent call last):
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/bin/pyinstaller", line 8, in <module>
sys.exit(run())
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 791, in build
exec(code, spec_namespace)
File "/home/matthaeus/cybathlon/planvec/qt_video_gui_example.spec", line 17, in <module>
noarchive=False)
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 243, in __init__
self.__postinit__()
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
self.assemble()
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 575, in assemble
self._check_python_library(self.binaries)
File "/home/matthaeus/.local/share/virtualenvs/planvec-R86NQhbu/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 681, in _check_python_library
raise IOError(msg)
OSError: Python library not found: libpython3.6mu.so.1.0, libpython3.6m.so, libpython3.6m.so.1.0, libpython3.6.so.1.0
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build parameters of Python installation.
* On Debian/Ubuntu, you would need to install Python development packages
* apt-get install python3-dev
* apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)
I tried the recommended python3-dev and python-dev installations without luck.
Now, I hope someone can enlighten me what is going on here!
Cheers,
Matt
You need to build with CPython shared-library enabled.
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6.9
eval "$(pyenv init -)"
Reference: https://github.com/pyenv/pyenv/wiki

pyInstaller executable missing module "_struct" on Ubuntu 12.04 Precise

I would like to package my python project into a UNIX executable. For this I've tried py2exe, cxfreeze and pyInstaller, but nothing worked. Hopefully you can help me with pyinstaller. So here it goes:
I've downloaded the zipfile of pyinstaller-2.0 from http://www.pyinstaller.org/ and unzipped it.
In the folder, I run python pyinstaller.py ../helloworld.py (output listed at the end).
Then I try to execute the file: ./helloworld/dist/helloworld/helloworld
which gives me the output:
mod is NULL - structTraceback (most recent call last):
File "/usr/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
mod is NULL - archiveTraceback (most recent call last):
File "/home/jelle/Downloads/pyinstaller-1.5.1/archive.py", line 42, in <module>
import struct
ImportError: No module named struct
Traceback (most recent call last):
File "<string>", line 25, in <module>
ImportError: No module named archive
I'm using Ubuntu 12.04 with Python 2.7.3. My PYTHONPATH include /usr/lib/python2.7. It looks as if the problem is a missing module _struct, but I have no idea where to find it. I've tried pyinstaller 1.5.1 and the development version, neither work here.
Please help!
The output of python pyinstaller.py ../helloworld.py:
7 INFO: wrote /home/jelle/Downloads/pyinstaller-2.0/helloworld/helloworld.spec
27 INFO: UPX is not available.
583 INFO: checking Analysis
583 INFO: building Analysis because out00-Analysis.toc non existent
583 INFO: running Analysis out00-Analysis.toc
702 INFO: Analyzing /home/jelle/Downloads/pyinstaller-2.0/support/_pyi_bootstrap.py
1570 INFO: Analyzing /home/jelle/Downloads/pyinstaller-2.0/PyInstaller/loader/archive.py
1637 INFO: Analyzing /home/jelle/Downloads/pyinstaller-2.0/PyInstaller/loader/carchive.py
1701 INFO: Analyzing /home/jelle/Downloads/pyinstaller-2.0/PyInstaller/loader/iu.py
1720 INFO: Analyzing ../helloworld.py
1721 INFO: Hidden import 'encodings' has been found otherwise
1721 INFO: Looking for run-time hooks
1721 INFO: Analyzing rthook /home/jelle/Downloads/pyinstaller-2.0/support/rthooks/pyi_rth_encodings.py
2197 INFO: Looking for Python library libpython2.7.so
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
2308 INFO: Warnings written to /home/jelle/Downloads/pyinstaller-2.0/helloworld/build/pyi.linux2/helloworld/warnhelloworld.txt
2311 INFO: checking PYZ
2311 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
2312 INFO: building PYZ out00-PYZ.toc
2706 INFO: checking PKG
2706 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
2706 INFO: building PKG out00-PKG.pkg
2711 INFO: checking EXE
2712 INFO: rebuilding out00-EXE.toc because helloworld missing
2712 INFO: building EXE from out00-EXE.toc
2772 INFO: Appending archive to EXE /home/jelle/Downloads/pyinstaller-2.0/helloworld/build/pyi.linux2/helloworld/helloworld
2773 INFO: checking COLLECT
2773 INFO: building COLLECT out00-COLLECT.toc
BTW: my helloworld.py simply contains the statement print "hello world". I tried putting #!/usr/bin/python2.7 at the top.
Check the value of the system variable LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
It might point to the wrong python library libpython2.7.so.
In my case, I could fix this by resetting it:
export LD_LIBRARY_PATH=

Categories