Use below command to resolve problem pip3 install PyQt5
I used other good answers from here and didn't solve the problem (Ubuntu 18.04, Python3.8), still get this warning. Actually there is one more package is needed to be installed to solve the problem: sudo apt-get install lzma So the whole pipeline (run in the python source code folder): sudo apt-get install liblzma-dev sudo apt-get install lzma ./configure --enable-optimizations sudo make sudo make altinstall