简体   繁体   English

无法在树莓派上使用 pip 安装 PyQt5

[英]Can't install PyQt5 using pip on raspberry pi

On a raspberry pi using raspbian buuster, am I trying to install PyQt5 using在使用 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

All of these commands yields所有这些命令都会产生

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.

Other libraries can be installed, it's just PyQt5.可以安装其他的库,就是PyQt5。 What is preventing me from installing just PyQt5 and how can it be fixed?是什么阻止我只安装 PyQt5,如何修复?

On a raspberry pi using raspbian buuster, am I trying to install PyQt5 using在使用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

All of these commands yields所有这些命令产生

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.

Other libraries can be installed, it's just PyQt5.可以安装其他库,仅是PyQt5。 What is preventing me from installing just PyQt5 and how can it be fixed?是什么让我无法仅安装PyQt5,如何解决?

from my experience installing pyqt5 is a little bit (toxic) and u need to be very careful when installing it what is the IDE that you use for python?根据我的经验,安装 pyqt5 有点(有毒),安装时需要非常小心,您用于 python 的 IDE 是什么? if it is Pycharm then (delete it and install it again) but make sure you ADD Python PATH如果它是 Pycharm 那么(删除它并重新安装它)但请确保添加 Python PATH 在此处输入图片说明

after you reinstall it (restart your pc ) then cmd -pip install pyqt5重新安装后(重启你的电脑)然后 cmd -pip install pyqt5

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM