Я хотел бы развернуть приложение, созданное в QT для Python (Pyside6 + QML). Когда я попытался запустить 'pyside6-deploy' в CMD в папке проекта, такая ошибка появилась: < /p>
'pyside6-deploy' is not recognized as an internal or external command, operable program or batch file.
Я пытался добавить «deploy.py» в PATH (C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py) , но все равно не работает.
Что мне нужно сделать, чтобы запустить команду «pyside6-deploy»?
ОС: Windows 11
#############################
РЕДАКТИРОВАТЬ:
Я исправил ПУТЬ на: C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\
PySide6 установлен:
Я не пишу код внутри любая виртуальная среда, так как у меня один компьютер только для игры с Qt, и все мои проекты согласованы (и для меня это тоже удобно).
Теперь "deploy.py" запускается, но Я получаю следующую ошибку:
C:\DANE\QtProjects\test3d_1>deploy.py
You are not using a virtual environment. pyside6-deploy needs to install a few Python packages for deployment to work seamlessly.
Proceed? [Y/n]Y
'pyside6-qmlimportscanner' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 25, in run_command
output = subprocess.check_output(command, shell=is_windows)
File "C:\Program Files\Python313\Lib\subprocess.py", line 472, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**kwargs).stdout
^^^^^^^^^
File "C:\Program Files\Python313\Lib\subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyside6-qmlimportscanner', '-rootPath', 'C:\\DANE\\QtProjects\\test3d_1', '-exclude', 'site-packages', '-exclude', 'deployment', '-exclude', '.qtcreator', '-exclude', 'build', '-exclude', 'dist', '-exclude', 'tests', '-exclude', 'doc', '-exclude', 'docs', '-exclude', 'examples']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py", line 214, in
main(args.main_file, args.name, args.config_file, args.init, args.loglevel, args.dry_run,
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.keep_deployment_files, args.force, args.extra_ignore_dirs, args.extra_modules,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.mode)
^^^^^^^^^^
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py", line 109, in main
config = DesktopConfig(config_file=config_file, source_file=main_file, python_exe=python.exe,
dry_run=dry_run, existing_config_file=config_file_exists,
extra_ignore_dirs=extra_ignore_dirs, mode=mode, name=name)
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 420, in __init__
super().__init__(config_file, source_file, python_exe, dry_run, existing_config_file,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
extra_ignore_dirs, name=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 166, in __init__
self.excluded_qml_plugins = self._find_excluded_qml_plugins()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 368, in _find_excluded_qml_plugins
self.qml_modules = set(run_qmlimportscanner(project_dir=self.project_dir,
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dry_run=self.dry_run))
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 58, in run_qmlimportscanner
_, json_string = run_command(command=cmd, dry_run=False, fetch_output=True)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 33, in run_command
raise RuntimeError(
......
)
RuntimeError: [DEPLOY] Command pyside6-qmlimportscanner -rootPath C:\DANE\QtProjects\test3d_1 -exclude site-packages -exclude deployment -exclude .qtcreator -exclude build -exclude dist -exclude tests -exclude doc -exclude docs -exclude examples failed with error Command '['pyside6-qmlimportscanner', '-rootPath', 'C:\\DANE\\QtProjects\\test3d_1', '-exclude', 'site-packages', '-exclude', 'deployment', '-exclude', '.qtcreator', '-exclude', 'build', '-exclude', 'dist', '-exclude', 'tests', '-exclude', 'doc', '-exclude', 'docs', '-exclude', 'examples']' returned non-zero exit status 1. and return_code1
Я нашел «qmlimportscanner.exe» внутри папки Pyside6, поэтому добавил также C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6 в PATH, но безуспешно — он ищет «pyside6-qmlimportscanner», а не «qmlimportscanner»
Я хотел бы развернуть приложение, созданное в QT для Python (Pyside6 + QML). Когда я попытался запустить 'pyside6-deploy' в CMD в папке проекта, такая ошибка появилась: < /p> [code]'pyside6-deploy' is not recognized as an internal or external command, operable program or batch file. [/code] Я пытался добавить «deploy.py» в PATH (C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py) , но все равно не работает. Что мне нужно сделать, чтобы запустить команду «pyside6-deploy»? ОС: Windows 11 ############################# РЕДАКТИРОВАТЬ: Я исправил ПУТЬ на: C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\ PySide6 установлен: [img]https://i.sstatic.net/YFy3YZQx.png[/img]
Я не пишу код внутри любая виртуальная среда, так как у меня один компьютер только для игры с Qt, и все мои проекты согласованы (и для меня это тоже удобно). Теперь "deploy.py" запускается, но Я получаю следующую ошибку: [code]C:\DANE\QtProjects\test3d_1>deploy.py You are not using a virtual environment. pyside6-deploy needs to install a few Python packages for deployment to work seamlessly. Proceed? [Y/n]Y 'pyside6-qmlimportscanner' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 25, in run_command output = subprocess.check_output(command, shell=is_windows) File "C:\Program Files\Python313\Lib\subprocess.py", line 472, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **kwargs).stdout ^^^^^^^^^ File "C:\Program Files\Python313\Lib\subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['pyside6-qmlimportscanner', '-rootPath', 'C:\\DANE\\QtProjects\\test3d_1', '-exclude', 'site-packages', '-exclude', 'deployment', '-exclude', '.qtcreator', '-exclude', 'build', '-exclude', 'dist', '-exclude', 'tests', '-exclude', 'doc', '-exclude', 'docs', '-exclude', 'examples']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py", line 214, in main(args.main_file, args.name, args.config_file, args.init, args.loglevel, args.dry_run, ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ args.keep_deployment_files, args.force, args.extra_ignore_dirs, args.extra_modules, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ args.mode) ^^^^^^^^^^ File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy.py", line 109, in main config = DesktopConfig(config_file=config_file, source_file=main_file, python_exe=python.exe, dry_run=dry_run, existing_config_file=config_file_exists, extra_ignore_dirs=extra_ignore_dirs, mode=mode, name=name) File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 420, in __init__ super().__init__(config_file, source_file, python_exe, dry_run, existing_config_file, ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ extra_ignore_dirs, name=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 166, in __init__ self.excluded_qml_plugins = self._find_excluded_qml_plugins() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\config.py", line 368, in _find_excluded_qml_plugins self.qml_modules = set(run_qmlimportscanner(project_dir=self.project_dir, ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dry_run=self.dry_run)) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 58, in run_qmlimportscanner _, json_string = run_command(command=cmd, dry_run=False, fetch_output=True) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6\scripts\deploy_lib\commands.py", line 33, in run_command raise RuntimeError( ...... ) RuntimeError: [DEPLOY] Command pyside6-qmlimportscanner -rootPath C:\DANE\QtProjects\test3d_1 -exclude site-packages -exclude deployment -exclude .qtcreator -exclude build -exclude dist -exclude tests -exclude doc -exclude docs -exclude examples failed with error Command '['pyside6-qmlimportscanner', '-rootPath', 'C:\\DANE\\QtProjects\\test3d_1', '-exclude', 'site-packages', '-exclude', 'deployment', '-exclude', '.qtcreator', '-exclude', 'build', '-exclude', 'dist', '-exclude', 'tests', '-exclude', 'doc', '-exclude', 'docs', '-exclude', 'examples']' returned non-zero exit status 1. and return_code1 [/code] Я нашел «qmlimportscanner.exe» внутри папки Pyside6, поэтому добавил также C:\Users\danie\AppData\Roaming\Python\Python313\site-packages\PySide6 в PATH, но безуспешно — он ищет «pyside6-qmlimportscanner», а не «qmlimportscanner»
Я хотел бы развернуть приложение, созданное в QT для Python (Pyside6 + QML). Когда я попытался запустить 'pyside6-deploy' в CMD в папке проекта, такая ошибка появилась:
'pyside6-deploy' is not recognized as an internal or external command,...
После того, как я установил Python и Djangom, я пытаюсь использовать VirtualEnv для проекта Django с использованием VirtualEnv. Я установил VirtualEnv с помощью Pip.
pip install virtualenv # got install successfully
Я пытаюсь установить ноутбук Jupyter, не устанавливая Anaconda на Windows. Я выполнил шаги в но, кажется, не работает. Я пытался закрыть и открыть командную строку и перезапустить окна, но тоже не работал. Что я пропустил?C:\Users\xxxxxx>pip install...