在创建带有form的python for qt的时候,使用的库是pySide6,而不是pyqt。
因此,需要安装pyside6。
Running "/usr/bin/python3 -m pip install PySide6 --user" to install PySide6.
ERROR: Could not find a version that satisfies the requirement PySide6 (from versions: none)
ERROR: No matching distribution found for PySide6
WARNING: You are using pip version 20.2.3; however, version 23.0.1 is available.
You should consider upgrading via the '/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip' command.
Installing the PySide6 failed with exit code 1
上面提示的问题分为2个命令,首先升级。
/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip'
然后安装pyside6.
/usr/bin/python3 -m pip install PySide6 --user
其中还需要安装PyLS
按照提示点击就可以安装python language server了。
另外,还得按照提示使用pyside6-uic form.ui -o ui_form.py来产生ui_form.py文件,否则不能执行。