安装python

 

 

https://www.python.org/downloads/

选择python3.6

print("hello world")

 

Qt Creator 整合 python 解释器教程 

 3.3 配置 python 解释器

工具 -> 选项 -> 环境 -> 外部工具 -> 添加目录(命名为 python ) -> 添加工具(命名为 python27 ) -> 配置参数.

说明:可以是任何文字

执行档:python的安装目录

参数:%{CurrentDocument:FilePath}

工作目录:%{CurrentDocument:Path}

单击: 工具 -> 外部 -> python -> python27

 

 

Traceback (most recent call last):
File "C:\Users\aaron\Documents\qtpy1\main.py", line 6, in <module>
from PySide2.QtGui import QGuiApplication
ModuleNotFoundError: No module named 'PySide2'

 

 

pip install pyside2
Collecting pyside2
Downloading https://files.pythonhosted.org/packages/ed/5e/d0d540385dcc5eeda877a4288a9a4970e0e7b2282e840c2b08ce5442542e/PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl (137.4MB)
100% |████████████████████████████████| 137.4MB 79kB/s
Collecting shiboken2==5.15.2.1 (from pyside2)
Downloading https://files.pythonhosted.org/packages/26/bd/a1b31f49eb35888eae318c27327732b1036f0d921e5c8ec2e7a4276e7445/shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl (2.3MB)
100% |████████████████████████████████| 2.3MB 38kB/s
Installing collected packages: shiboken2, pyside2
Successfully installed pyside2-5.15.2.1 shiboken2-5.15.2.1
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

 

 

 

posted @ 2022-01-17 21:43  aaronwell  阅读(127)  评论(0)    收藏  举报