GoodAI / space-engineers-ai-spaceship-generator

Release repo for the AI Spaceship Generator project
MIT License
104 stars 11 forks source link

Pyinstaller had issues finding sklearn modules #19

Open BalooRM opened 1 year ago

BalooRM commented 1 year ago

Issue type: bug

Severity: medium

Describe the issue Windows EXE builds but does not run. See several iterations and the apparent resolution below. The resolution was taken from StackOverflow (https://stackoverflow.com/questions/56860120/how-do-i-resolve-a-missing-utility-module-preventing-my-executable-from-running), adding the following line to the generated spec file, and running pyinstaller from the command line with the modified spec file.

a.datas += Tree('', prefix='sklearn')

To Reproduce call "AI Spaceship Generator (no Pytorch)_20221209.exe" Traceback (most recent call last): File "main_webapp_launcher.py", line 19, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\main_webapp\webapp.py", line 41, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\utils.py", line 11, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\mapelites\map.py", line 10, in ModuleNotFoundError: No module named 'joblib' [2080] Failed to execute script 'main_webapp_launcher' due to unhandled exception!

This issue was resolved by running 'python -m pip install joblib' and rerunning 'python build_main_webapp.py'

Result: call "AI Spaceship Generator (no Pytorch)_20221209.exe" Traceback (most recent call last): File "main_webapp_launcher.py", line 19, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\main_webapp\webapp.py", line 41, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\utils.py", line 11, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\mapelites\map.py", line 28, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\mapelites\emitters.py", line 7, in ModuleNotFoundError: No module named 'sklearn' [14156] Failed to execute script 'main_webapp_launcher' due to unhandled exception!

python -m pip install sklearn --user Requirement already satisfied: sklearn in c:\users\balle\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (0.0.post1)

python -m pip install scikit-learn --user Collecting scikit-learn Downloading scikit_learn-1.2.0-cp310-cp310-win_amd64.whl (8.2 MB) ---------------------------------------- 8.2/8.2 MB 23.9 MB/s eta 0:00:00 Requirement already satisfied: joblib>=1.1.1 in c:\users\balle\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from scikit-learn) (1.2.0) Requirement already satisfied: numpy>=1.17.3 in c:\users\balle\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from scikit-learn) (1.23.0) Requirement already satisfied: scipy>=1.3.2 in c:\users\balle\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from scikit-learn) (1.8.1) Collecting threadpoolctl>=2.0.0 Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB) Installing collected packages: threadpoolctl, scikit-learn Successfully installed scikit-learn-1.2.0 threadpoolctl-3.1.0

Rerunning 'python build_main_webapp.py' produces an executable, but it can't find sklearn modules.

call "AI Spaceship Generator (no Pytorch)_20221209.exe" Traceback (most recent call last): File "main_webapp_launcher.py", line 19, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\main_webapp\webapp.py", line 41, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\guis\utils.py", line 11, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\mapelites\map.py", line 28, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "pcgsepy\mapelites\emitters.py", line 7, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\neural_network__init.py", line 10, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\neural_network_multilayer_perceptron.py", line 26, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\model_selection__init.py", line 23, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\model_selection_validation.py", line 32, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics\init.py", line 42, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics\cluster\init__.py", line 22, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics\cluster_unsupervised.py", line 16, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics\pairwise.py", line 33, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics_pairwise_distances_reduction\init__.py", line 89, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "sklearn\metrics_pairwise_distances_reduction_dispatcher.py", line 11, in File "sklearn\metrics_pairwise_distances_reduction_base.pyx", line 1, in init sklearn.metrics._pairwise_distances_reduction._base ModuleNotFoundError: No module named 'sklearn.metrics._pairwise_distances_reduction._datasets_pair' [18380] Failed to execute script 'main_webapp_launcher' due to unhandled exception!

Expected behavior Expected the executable to run.

Screenshots N/A - Please see screen output.

Log file

python build_main_webapp.py

1090 INFO: PyInstaller: 5.7.0 1090 INFO: Python: 3.10.9 1103 INFO: Platform: Windows-10-10.0.22000-SP0 1104 INFO: wrote C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\AI Spaceship Generator (no Pytorch)_20221209.spec 1109 INFO: UPX is not available. 1109 INFO: Removing temporary files and cleaning cache in C:\Users\balle\AppData\Local\pyinstaller 1421 WARNING: collect_data_files - skipping data collection for module 'dash_daq' as it is not a package. 1422 INFO: Extending PYTHONPATH with paths ['C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study'] 2937 INFO: checking Analysis 2937 INFO: Building Analysis because Analysis-00.toc is non existent 2938 INFO: Initializing module dependency graph... 2948 INFO: Caching module graph hooks... 2958 WARNING: Several hooks defined for module 'numpy'. Please take care they do not conflict. 2970 INFO: Analyzing base_library.zip ... 8197 INFO: Loading module hook 'hook-encodings.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 9918 INFO: Loading module hook 'hook-heapq.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 11386 INFO: Loading module hook 'hook-pickle.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 12933 INFO: Caching module dependency graph... 13033 INFO: running Analysis Analysis-00.toc 13051 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64qbz5n2kfra8p0\python.exe 13117 WARNING: lib not found: api-ms-win-appmodel-runtime-l1-1-0.dll dependency of C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64qbz5n2kfra8p0\python.exe 13343 INFO: Analyzing C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\main_webapp_launcher.py 13464 INFO: Loading module hook 'hook-platform.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 13980 INFO: Loading module hook 'hook-numpy.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\_pyinstaller'... 14843 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 15417 INFO: Loading module hook 'hook-difflib.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 15812 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 16115 INFO: Loading module hook 'hook-xml.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 17008 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 17679 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 19033 INFO: Loading module hook 'hook-matplotlib.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 19823 INFO: Loading module hook 'hook-packaging.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 20028 INFO: Processing pre-safe import module hook gi from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-gi.py'. 20210 INFO: Loading module hook 'hook-PIL.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 20263 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 22230 INFO: Loading module hook 'hook-pycparser.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 22708 INFO: Processing pre-find module path hook distutils from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'. 24271 INFO: Loading module hook 'hook-distutils.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 24319 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 24620 INFO: Loading module hook 'hook-setuptools.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 31340 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 36835 INFO: Loading module hook 'hook-jinja2.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 38571 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 39579 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 40267 INFO: Processing pre-safe import module hook six.moves from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'. 42232 INFO: Loading module hook 'hook-certifi.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 42466 INFO: Loading module hook 'hook-scipy.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 42934 INFO: Loading module hook 'hook-scipy.linalg.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 43350 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 45335 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 48471 INFO: Loading module hook 'hook-dash.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 48887 INFO: Loading module hook 'hook-plotly.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 93984 INFO: Loading module hook 'hook-pandas.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 97872 INFO: Loading module hook 'hook-pytz.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 100643 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 104492 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 106895 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 107591 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 110824 INFO: Loading module hook 'hook-kaleido.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 111322 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-urllib3.packages.six.moves.py'. 113655 INFO: Loading module hook 'hook-patsy.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 116253 INFO: Loading module hook 'hook-statsmodels.tsa.statespace.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 137182 INFO: Loading module hook 'hook-dash_bootstrap_components.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 138003 INFO: Loading module hook 'hook-sklearn.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 139554 INFO: Loading module hook 'hook-sklearn.utils.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 140075 INFO: Loading module hook 'hook-sklearn.cluster.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 140156 INFO: Loading module hook 'hook-sklearn.metrics.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 140392 INFO: Loading module hook 'hook-sklearn.metrics.cluster.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 140434 INFO: Loading module hook 'hook-sklearn.metrics.pairwise.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 140854 INFO: Loading module hook 'hook-sklearn.neighbors.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 141158 INFO: Loading module hook 'hook-sklearn.linear_model.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 143212 INFO: Processing pre-find module path hook pyi_splash from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\pre_find_module_path\hook-pyi_splash.py'. 143215 INFO: Adding pyi_splash module to application dependencies. 143223 INFO: Processing module hooks... 251223 WARNING: Hidden import "sklearn.neighbors._typedefs" not found! 251284 INFO: Loading module hook 'hook-sklearn.tree.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'... 251503 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 251504 INFO: Matplotlib backend selection method: automatic discovery of used backends 252187 INFO: Trying determine the default backend as first importable candidate from the list: ['Qt5Agg', 'Gtk3Agg', 'TkAgg', 'WxAgg'] 254655 INFO: Selected matplotlib backends: ['TkAgg'] 255206 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 255318 INFO: Processing pre-safe import module hook win32com from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\_pyinstaller_hooks_contrib\hooks\pre_safe_import_module\hook-win32com.py'. 256464 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 256465 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 256467 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 256489 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 257917 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks'... 258283 INFO: checking Tree 258283 INFO: Building Tree because Tree-00.toc is non existent 258284 INFO: Building Tree Tree-00.toc 258450 INFO: checking Tree 258450 INFO: Building Tree because Tree-01.toc is non existent 258451 INFO: Building Tree Tree-01.toc 258670 INFO: checking Tree 258671 INFO: Building Tree because Tree-02.toc is non existent 258672 INFO: Building Tree Tree-02.toc 259289 INFO: Looking for ctypes DLLs 259443 INFO: Analyzing run-time hooks ... 259495 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_inspect.py' 259504 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_mplconfig.py' 259511 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py' 259521 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py' 259529 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_setuptools.py' 259537 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgres.py' 259547 INFO: Including run-time hook 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\hooks\rthooks\pyi_rth__tkinter.py' 259702 INFO: Looking for dynamic libraries C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py:174: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47. import(package) 5676 INFO: Extra DLL search directories (AddDllDirectory): ['C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\.libs', 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\scipy\.libs'] 5677 INFO: Extra DLL search directories (PATH): ['C:\Program Files\ImageMagick-7.1.0-Q16-HDRI', 'C:\windows\system32', 'C:\windows', 'C:\windows\System32\Wbem', 'C:\windows\System32\WindowsPowerShell\v1.0\', 'C:\windows\System32\OpenSSH\', 'C:\Program Files\Git\cmd', 'C:\Program Files\Git\mingw64\bin', 'C:\Program Files\Git\usr\bin', 'C:\Program Files\PuTTY\', 'C:\Program Files\TortoiseGit\bin', 'C:\Users\balle\AppData\Local\Microsoft\WindowsApps', 'C:\Program Files\Emacs\x86_64\bin', 'C:\usrlocalbin\ffmpeg\bin', 'C:\Program Files\Tesseract-OCR', 'C:\Users\balle\belfry', 'C:\Users\balle\AppData\Local\Programs\Microsoft VS Code\bin', 'C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts'] 267816 INFO: Looking for eggs 267816 INFO: Using Python library C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\python310.dll 267818 INFO: Found binding redirects: [] 267868 INFO: Warnings written to C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\build\AI Spaceship Generator (no Pytorch)_20221209\warn-AI Spaceship Generator (no Pytorch)_20221209.txt 268819 INFO: Graph cross-reference written to C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\build\AI Spaceship Generator (no Pytorch)_20221209\xref-AI Spaceship Generator (no Pytorch)_20221209.html 269147 INFO: Appending 'datas' from .spec 269198 INFO: checking PYZ 269198 INFO: Building PYZ because PYZ-00.toc is non existent 269199 INFO: Building PYZ (ZlibArchive) C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\build\AI Spaceship Generator (no Pytorch)_20221209\PYZ-00.pyz 273300 INFO: Building PYZ (ZlibArchive) C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\build\AI Spaceship Generator (no Pytorch)_20221209\PYZ-00.pyz completed successfully. 273600 INFO: Collect tcl/tk binaries for the splash screen 273974 INFO: checking Tree 273975 INFO: Building Tree because Tree-03.toc is non existent 273975 INFO: Building Tree Tree-03.toc 274131 INFO: checking Tree 274131 INFO: Building Tree because Tree-04.toc is non existent 274132 INFO: Building Tree Tree-04.toc 274347 INFO: checking Tree 274348 INFO: Building Tree because Tree-05.toc is non existent 274349 INFO: Building Tree Tree-05.toc 274561 INFO: checking Splash 274561 INFO: Building Splash because Splash-00.toc is non existent 274562 INFO: Building Splash C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\build\AI Spaceship Generator (no Pytorch)_20221209\Splash-00.res 274572 INFO: checking PKG 274573 INFO: Building PKG because PKG-00.toc is non existent 274573 INFO: Building PKG (CArchive) AI Spaceship Generator (no Pytorch)_20221209.pkg 312517 INFO: Building PKG (CArchive) AI Spaceship Generator (no Pytorch)_20221209.pkg completed successfully. 312567 INFO: Bootloader C:\Users\balle\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe 312567 INFO: checking EXE 312568 INFO: Building EXE because EXE-00.toc is non existent 312568 INFO: Building EXE from EXE-00.toc 312580 INFO: Copying bootloader EXE to C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\dist\AI Spaceship Generator (no Pytorch)_20221209.exe.notanexecutable 312598 INFO: Copying icon to EXE 312599 INFO: Copying icons from ['C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\assets\favicon.ico'] 312600 INFO: Writing RT_GROUP_ICON 0 resource with 20 bytes 312601 INFO: Writing RT_ICON 1 resource with 4264 bytes 312604 INFO: Copying 0 resources to EXE 312604 INFO: Embedding manifest in EXE 312605 INFO: Updating manifest in C:\Users\balle\Github\space-engineers-ai-spaceship-generator\user-study\dist\AI Spaceship Generator (no Pytorch)_20221209.exe.notanexecutable 312607 INFO: Updating resource type 24 name 1 language 0 312611 INFO: Appending PKG archive to EXE 312763 INFO: Fixing EXE headers 313531 INFO: Building EXE from EXE-00.toc completed successfully.

Desktop (please complete the following information):

Additional context The executable runs when generated with pyinstaller from the command line with a manually modified spec file.

gallorob commented 1 year ago

Hi @BalooRM, thanks for reporting this issue!

I'm adding joblib to the requirements, so it will be installed automatically alongside the library (not sure why it was not installed for you, seeing as it was a dependency already required by another library). Refer to 8bb8de789ece3f060e1bd3375b02dc6ea909c4b2.

As for sklearn not being found, again, that's unexpected indeed. I assume you're running the build from the main branch? I've added a --collect-data flag in the build_main_webapp.py for scipy already, so maybe that already solves it. @martinpoliak-goodai seemed to be able to build the application and run it with no missing libraries errors, so maybe try building from the other branch and let me know?