Can't install PyQt5 using pip on raspberry pi

偶尔善良 提交于 2020-01-05 04:07:07

问题


On a raspberry pi using raspbian buuster, am I trying to install PyQt5 using

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. What is preventing me from installing just PyQt5 and how can it be fixed?


回答1:


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? if it is Pycharm then (delete it and install it again) but make sure you ADD Python PATH

after you reinstall it (restart your pc ) then cmd -pip install pyqt5




回答2:


This is a bug in pyproject.toml: change

requires = ["sip >=5.0.1 <6", "PyQt-builder >=1.1.0, <2"]

to

requires = ["sip >=5.0.1, <6", "PyQt-builder >=1.1.0, <2"]

and compile.



来源:https://stackoverflow.com/questions/59462014/cant-install-pyqt5-using-pip-on-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!