Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to install pyqt5 instead of pip in python?


Asked by Kareem Carpenter on Dec 10, 2021 FAQ



If you're using various versions of Python, use python -m pip install PyQt5 instead of pip. Try this : Check your python directory correctly installed or Not. Go to the below a directory by cmd and run the commands. your PRO.py program now ready to run successfully. It seems like your pycharm is configured to use virtual environment.
In this manner,
Use the installer from qt to install PyQt. Install python 3.3, then check to add all of the PyQt5 extras. It’s not necessary to compile everything, you can install the packages with the installer. On Python >= 3.6, you can also try. pip install pyqt5. It should work without problems.
And, The GPL version of PyQt5 can be installed from PyPI: The wheels include a copy of the required parts of the LGPL version of Qt. pip will also build and install the bindings from the sdist package but Qt’s qmake tool must be on PATH.
Accordingly,
Stay in the Project Interpreter interface, click on the +, find and install pyqt5. pyqt5-sip, pyqt5-tools. After successful installation, the interface should look like this. You can start designer directly from PyCharm. Make sure designer is installed first. Designer is not installed with the pip installation. On Fedora Linux you can do this:
Besides,
Choose your package according to your Python version. Example, if you are running Python 3.7.3 32-bits you should choose PyQt4‑4.11.4‑cp37‑cp37m‑win32.whl. To know your Python version you can type on the command line python -VV (Double -V argument gives more info on the vesion). You can also check the thread on StackOverflow.