4

I am trying to install PyQt5 on my Raspberry Pi machine.

I have tried:

pip3 install pyqt5

pip3 install --upgrade pip
pip3 install pyqt5==5.14.0

sudo apt-get update 
sudo apt-get install python3-pyqt5

they all give me the error:

  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'
asohasf1241
  • 195
  • 1
  • 10
  • It seems there's a solution here: https://stackoverflow.com/questions/59558343/cant-install-pyqt5-on-raspberry-pi – Rivers Nov 20 '20 at 13:30

2 Answers2

5

Please try :

sudo apt install python3-pyqt5
everyt4u
  • 314
  • 3
  • 5
3

You are trying to install PyQt5==5.14.0

https://pypi.org/project/PyQt5/5.14.0/#files

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 = "info@riverbankcomputing.com"
license = "GPL v3"
description-file = "README"

sip >=5.0.1 <6 is not a valid PEP518 format. It should be sip >=5.0.1, <6

In PyQt5==5.14.1 this error was fixed.

Tin Nguyen
  • 5,250
  • 1
  • 12
  • 32