本文介绍了无法在树莓派上安装 PyQt5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的 Raspberry Pi 机器上安装 PyQt5.
I am trying to install PyQt5 on my Raspberry Pi machine.
我试过了:
pip3 install pyqt5
pip3 install --upgrade pip
pip3 install pyqt5==5.14.0
sudo apt-get update
sudo apt-get install python3-pyqt5
他们都给我错误:
Using cached PyQt5-5.14.0.tar.gz (3.2 MB)
ERROR: pyqt5==5.14 from https://files.pythonhosted.org/packages/7c/5b/e760ec4f868cb77cee45b4554bf15d3fe6972176e89c4e3faac941213694/PyQt5-5.14.0.tar.gz#sha256=0145a6b7de15756366decb736c349a0cb510d706c83fda5b8cd9e0557bc1da72 has a pyproject.toml file that does not comply with PEP 518: 'build-system.requires' contains an invalid requirement: 'sip >=5.0.1 <6'
推荐答案
您正在尝试安装 PyQt5==5.14.0
https://pypi.org/project/PyQt5/5.14.0/#文件
PyQt5-5.14.0.tar.gz\PyQt5-5.14.0.tar\PyQt5-5.14.0\pyproject.toml
# Specify the build system requirements.
[build-system]
requires = ["sip >=5.0.1 <6", "PyQt-builder >=1.1.0, <2"]
build-backend = "sipbuild.api"
# Specify the PEP 566 metadata for the project.
[tool.sip.metadata]
name = "PyQt5"
version = "5.14.0"
summary = "Python bindings for the Qt cross platform application toolkit"
home-page = "https://www.riverbankcomputing.com/software/pyqt/"
author = "Riverbank Computing Limited"
author-email = "[email protected]"
license = "GPL v3"
description-file = "README"
sip >=5.0.1 不是有效的 PEP518 格式.它应该是
sip >=5.0.1,
sip >=5.0.1 <6
is not a valid PEP518 format. It should be sip >=5.0.1, <6
在 PyQt5==5.14.1
中,此错误已修复.
In PyQt5==5.14.1
this error was fixed.
这篇关于无法在树莓派上安装 PyQt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!