RPG
RPG

Reputation: 31

Problems running pyinstaller on Windows for first time

I am trying to run pyinstaller on a Windows 10 machine and I am getting the error below. Could somebody tell me that is the problem? I cannot understand which file is not finding.

Python is version 3.10.5 and pyinstaller is version 5.1.

Error here:

C:\Users\username\Desktop\CROWGUI>pyinstaller --onefile --noconfirm --console --clean --log-level=WARN --key=MySuperSecretPassword --strip --add-data=“commander.py;.” crow_gui.py 5983 WARNING: Ignoring /System/Library/Frameworks/IOKit.framework/IOKit imported from C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\serial\tools\list_ports_osx.py - only basenames are supported with ctypes imports! 5983 WARNING: Ignoring /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation imported from C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\serial\tools\list_ports_osx.py - only basenames are supported with ctypes imports! Traceback (most recent call last): File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py”, line 196, in run_module_as_main return run_code(code, main_globals, None, File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py”, line 86, in run_code exec(code, run_globals) File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\pyinstaller.exe_main.py”, line 7, in File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller_main.py”, line 178, in run run_build(pyi_config, spec_file, **vars(args)) File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller_main.py”, line 59, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py”, line 842, in main build(specfile, distpath, workpath, clean_build) File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py”, line 764, in build exec(code, spec_namespace) File “C:\Users\username\Desktop\CROWGUI\crow_gui.spec”, line 24, in exe = EXE( File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py”, line 506, in init self.pkg = PKG( File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py”, line 206, in init self.postinit() File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py”, line 173, in postinit self.assemble() File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py”, line 269, in assemble fnm = checkCache( File “C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\utils.py”, line 367, in checkCache subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py”, line 501, in run with Popen(*popenargs, **kwargs) as process: File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py”, line 969, in init self._execute_child(args, executable, preexec_fn, close_fds, File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py”, line 1438, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

Upvotes: 0

Views: 852

Answers (2)

RPG
RPG

Reputation: 31

After trying installing several versions of PyInstaller and looking into the official script of PyInstaller, I found out that the issue is related to the --strip option. After removing that option all worked find.

Upvotes: 2

itsWavs
itsWavs

Reputation: 56

Its hard to judge just by the log. Where are your files located? Which file is your main file and which ones do you need to be included? What is your folder structure?

Upvotes: 1

Related Questions