在使用raspbian buuster的raspberry pi上,我是否尝试使用PyQt5安装
pip install PyQt5
pip3 install PyQt5
sudo -H pip install PyQt5
python3 -m pip install PyQt5
python3 -m pip install PyQt5 --user
所有这些命令都会产生
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-rsse8fpi/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'sip >=5.0.1 <6' 'PyQt-builder >=1.1.0, <2'
cwd: None
Complete output (1 lines):
ERROR: Invalid requirement: 'sip >=5.0.1 <6'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-rsse8fpi/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'sip >=5.0.1 <6' 'PyQt-builder >=1.1.0, <2' Check the logs for full command output.
可以安装其他库,它只是PyQt5。是什么让我无法仅安装PyQt5,如何解决?
答案 0 :(得分:0)
根据我的经验安装pyqt5有点(有毒) 而且您在安装时需要非常小心 您用于python的IDE是什么? 如果是Pycharm,则(删除并重新安装),但请确保您添加了Python PATH
重新安装(重新启动PC)后,然后按cmd -pip安装pyqt5
答案 1 :(得分:0)
这是pyproject.toml
中的错误:更改
requires = ["sip >=5.0.1 <6", "PyQt-builder >=1.1.0, <2"]
到
requires = ["sip >=5.0.1, <6", "PyQt-builder >=1.1.0, <2"]
然后编译。