problem running pyside6-deploy
-
wrote on 4 Feb 2024, 14:21 last edited by
Hi, I made an ap using the Qt Creator IDE on a MacOs M2. When trying to deploy it it gives me this error. I have tried using a version of CPython but it keeps giving errors and I don't know what the problem is. (venv) name@MacBook-Pro miApp % pyside6-deploy main.py
FATAL: Error, for standalone mode, Apple Python from macOS is not supported, use e.g. CPython instead.
[DEPLOY] Exception occurred: Traceback (most recent call last):
File "/Users/name/miApp/venv/lib/python3.9/site-packages/PySide6/scripts/deploy_lib/commands.py", line 24, in run_command
subprocess.check_call(command, shell=is_windows)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/name/miApp/venv/bin/python', '-m', 'nuitka', '/Users/name/miApp/main.py', '--follow-imports ', '--onefile', '--enable-plugin=pyside6', '--output-dir=/Users/name/miApp/deployment', '--quiet', '--noinclude-qt-translations= True']' returned non-zero exit status 1.During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/name/miApp/venv/lib/python3.9/site-packages/PySide6/scripts/deploy.py", line 97, in main
command_str = python.create_executable(
File "/Users/name/miApp/venv/lib/python3.9/site-packages/PySide6/scripts/deploy_lib/python_helper.py", line 200, in create_executable
command_str = self.nuitka.create_executable(
File "/Users/name/miApp/venv/lib/python3.9/site-packages/PySide6/scripts/deploy_lib/nuitka_helper.py", line 59, in create_executable
command_str, _ = run_command(command=command, dry_run=dry_run)
File "/Users/name/miApp/venv/lib/python3.9/site-packages/PySide6/scripts/deploy_lib/commands.py", line 30, in run_command
raise RuntimeError(
RuntimeError: [DEPLOY] Command /Users/name/miApp/venv/bin/python -m nuitka /Users/name/miApp/main.py --follow-imports --onefile --enable-plugin=pyside6 --output- dir=/Users/name/miApp/deployment --quiet --noinclude-qt-translations=True failed with error Command '['/Users/name/miApp/venv/bin/python', '-m', 'nuitka ', '/Users/name/miApp/main.py', '--follow-imports', '--onefile', '--enable-plugin=pyside6', '--output-dir=/Users/name/miApp/deployment', '--quiet', '--noinclude-qt-translations=True']' returned non-zero exit status 1. and return_code1 -
Hi and welcome to devnet,
One thing you can do is use something like conda to create a virtual environment and a non system Python. You can also use brew to install other Python versions and use virtual env with them.
-
wrote on 8 Feb 2024, 08:35 last edited by
@IvanVM said in problem running pyside6-deploy:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/
Hey,
Unfortunately /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/ is considered to be Apple Python by Nuitka.
I suggest download Python from the official website and use it - eg: https://www.python.org/downloads/release/python-3118/.
Note: If you use a venv, don't create the venv in the application directory as pyside6-deploy will try to package the venv as well resulting in errors.
1/3