【发布时间】:2020-04-15 03:17:59
【问题描述】:
在使用 raspbian buuster 的树莓派上,我是否尝试使用安装 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,如何解决?
【问题讨论】:
-
你可以通过apt安装:包
sudo apt install python3-pyqt5 -
谢谢!这解决了问题
-
sip >=5.0.1 <6中缺少逗号,必须是sip >=5.0.1, <6 -
不幸的是,这并不能解决问题,因为任何其他依赖于 pyqt5 的 pip3 包也将无法安装。
标签: python pip raspberry-pi pyqt5 raspbian