Install PyQt5 5.14.1 on Linux

I think the initial pip install woes were due to PyQt5 switching to the manylinux2014 platform tag for the latest release (see the wheels on PyPI for 5.14.1 vs 5.14.0). Only pip versions >= 19.3 recognize this platform tag (ref), so if you happen to have an older version of pip, it would instead try to install from source.

Two easy options (to avoid the source install):

  • Update pip to the latest via pip3 install --upgrade pip
  • Install the previous release, which used manylinux1 (pip3 install pyqt5==5.14.0)

It seems that there is a bug in the latest version of PyQt5 to pypi so I installed a version 5.14:

sudo apt-get update && \
    sudo apt-get autoclean

sudo apt-get update && sudo apt-get install \
    -y --no-install-recommends \
    python3-pip \
    python3-setuptools

sudo python3 -m pip install pyqt5==5.14 pyqtchart==5.14

Copy the example of my previous answer in the main.py and then run:

python3 main.py

I recommend you search the folders and files generated by your failed attempts and delete them.

For my test I used the following Dockerfile


I also had the same issue installing PyQt5 (while trying to install ReText).

On Ubuntu 18.04 with Python 3.6.9 and Pip 9.0.1, I was able to pip install PyQt5 with these steps:

python3 -m venv env
source env/bin/activate
pip3 install pyqt5 --only-binary pyqt5

That was enough to make pip download the PyQt5-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl binary wheel (that doesn't need/use the setup.py) instead of building from the source tarball.

According to https://pypi.org/project/PyQt5/#files, there are other binary wheels too, so hopefully that'll cover most platform needs.