I want to install pyqt5 on python 2.7. I've tried to download on their website, but I can't open the website. I used:
pip install
and I got:
ERROR: Could not find a version that satisfies the requirement pyqt5 (from versions: none)
ERROR: No matching distribution found for pyqt5
You didn't mention an OS, but here is my experience with OSX - hopefully it is helpful to someone.
pyqt5 installed though pip appears to require python3 - and I couldn't find a way around it. After spending a bit of time trying to figure this out recently, there are two options I know of:
1) build from source, e.g. https://robonobodojo.wordpress.com/2017/02/08/installing-pyqt4-on-mac-osx/ , https://fredrikaverpil.github.io/2015/11/25/compiling-pyqt5-for-python-2-7-on-os-x/, for pyqt4 (just in case), pyqt5, respectively.
2) install using conda https://docs.conda.io/en/latest/miniconda.html
I was unable to get 1) working for me (on OSX 10.14.5) due to, I believe, an issue with paths configuration. But conda worked immediately. Once installed (by choosing the python2 install), just do conda install pyqt.
edit: there is also an Ubuntu guide for building from source here : https://plashless.wordpress.com/2014/03/26/building-pyqt5-for-python2-7-on-a-clean-ubuntu-13-10-build-machine/
pyqt5 requires python 3.4 or later
Related
When trying to install qt4 for python 2.7 (that I need to run some scripts written by other developers):
$ sudo pip install PyQt4
Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4
Additional information:
$ python --version
Python 2.7.15+
$ pip list
Package Version
---------- -------
numpy 1.16.5
pip 19.3
pyqtgraph 0.10.0
setuptools 41.4.0
wheel 0.33.6
Any suggestion on how to install it?
Please note that I have tried the solution proposed here:
pip install PyQt4-4.11.4-cp35-none-win_amd64.whl
ERROR: PyQt4-4.11.4-cp35-none-win_amd64.whl is not a supported wheel on this platform.
I guess because it is not a windows platform, isn't it? I am trying to install it on XUbuntu 18.04.
As suggested in one of the comment by #phd "PyQt4-4.11.4-cp35-none-win_amd64.whl is for Python 3.5 and Python 64-bit. You need to download wheel for Python 2.7".
I have tryed also:
$ pip install PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl
Requirement 'PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl' looks like a filename, but the file does not exist
PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl is not a valid wheel filename.
So the question can be: how to install the right version? How to find the right packet? My problem is exactly this one: I do not know how to move myself in this big forest. Thank you for every suggestion.
Building on sinoroc's answer: PyQt4 is outdated, and only PyQt6 or PyQt5 are available on PIP. See this website.
pip install PyQt6
By default pip looks for project distributions on Pypi. If you ask for pip install PyQt4, then you can also manually look at the page for this PyQt4 project on PyPi. There you will eventually see that there are no distributions at all to download so pip won't be able to install anything on any platform for any Python version at all. You need to look for alternatives.
You can have a look at the homepage of the PyQt project and you will eventually find the page to download the PyQt4 source code. There is a link on this page for the Linux source code of PyQt4, so you might want to have a look at it and see if you can get it installed on your system.
I try to install pyqt5-tools like this:
pip install pyqt5-tools
and the resulting out put is:
ERROR: Could not find a version that satisfies the requirement pyqt5-tools (from versions: none)
ERROR: No matching distribution found for pyqt5-tools
I need to download pyqt5-tools because I am trying to learn how to make GUIs with PyQt (I am a beginner programmer).
I have tried downloading different packages but anything related to PyQt has failed... It happens on both my Mac and Ubuntu machine.
I have checked that the packages are available on PyPI and literally copy-pasted the install command from the website into the terminal to make sure that I did not do it wrong.
Assuming you are installing that for qtdesigner. You can install it by package manager. I've installed it on my Debian machine
sudo apt install pyqt5-dev-tools pyqt5-dev
And you can find QtDesigner in
/usr/lib/x86_64-linux-gnu/qt5/bin/designer
If you are on windows use pip install PyQt5Designer instead.
You can download pyside2 it includes almost everything in pyqt5-tools; pyqt5, pyuic5 and the qdesigner
pip install PySide2
pyqt5-tools is only available for Windows as seen on their site: https://pypi.org/project/pyqt5-tools/
Try an alternative such as QT-creator for Mac: https://www.qt.io/download
This post strongly supports using Homebrew: Python PyQt on macOS Sierra
At first, if you are using python v3.10, probably, it won't work well.
when I have this error I uninstall python.
then install the python v3.9. it works better as it is older than v3.10
Best Solution I found
If you try to download pyqt5-tools it's not going to work with python v.3.10.x. But if you want to download it correctly you should try this solution because it works for me.
Install PyQt5:
pip install pyqt5
Install PyQt5Designer:
pip install PyQt5Designer
Then you should Find the Qt Designer, under the name designer.exe:
C:\...\Python\Python310\Lib\site-packages\QtDesigner\designer.exe
Note that the installation path of python may be different for you, to find yours, try this on your Python interpreter, type the following commands:
>>> import os, sys
>>> os.path.dirname(sys.executable)
'C:\\path-to-your-python-installation\\Python\\Python310'
Then you should find the QtDesigner after that path in for of:
C:\...\Python310\Lib\site-packages\QtDesigner\designer.exe
Just click on it, and pin it to your start or taskbar.
Or Simply if you want to download it directly as .exe, But I'm not sure if this can miss some pyqt5-tools:
Qt Designer Download
Go to Your python installation folder and find this followings:
Go here
Lib\site-packages\qt5_applications\Qt\bin
and you will find your qt designer
you should change your version from the newest version to a slightly old one, for example, 3.10 to 3.8 .
it is a normal thing when a new version is released, keep in mind that you have to update pip (using: python -m pip install --upgrade pip )
I've been trying to install pygame for Python 3.5.1 on Windows 10, 64 bit. Everything I've attempted so far has resulted in an error message in some form.
My latest attempt has been when I downloaded pygame-1.9.2a0-cp35-none-win_amd64.whl (also tried the 32-bit, got same error) from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and dragged the .whl file into Python35-32/Scripts. I then proceeded to go to command prompt and do the pip install thing, to which I got this message:
"Could not find a version that satisfies the requirement pygame-1.9.2a0-cp35-none-win_amd64 (from versions: )
No matching distribution found for pygame pygame-1.9.2a0-cp35-none-win_amd64"
I am aware that I may be installing it incorrectly, but from my understanding of other guides, this is what they say to have done. I would greatly appreciate help if possible.
It sounds like you've left the file extension off of the filename when you're calling pip install. Make sure you include the .whl extension, of pip will think the file name is the name of a package it should be downloading for you.
Pygame is not compatible with python 3.5. But it is with python 3.4. You can find binaries at: https://bitbucket.org/pygame/pygame/downloads
For previous version of python: https://www.python.org/downloads/
The first thing to check is that you have the 64 bit version of Python (the default windows download is 32bit). If not, here's the link:
https://www.python.org/downloads/release/python-360/
When you have the 64 bit python going, From the command prompt / Powershell, use "pip install pygame" or "python -m pip install pygame" then you will be sure the os, python, and pygame are all 64bit, mixing and matching doesn't work.
I've been having a ton of issues in general trying to install packages on python 3 on windows. I don't know if any issues are related or not, I'm just going to try to provide as much detail to these issues as I can.
It's not just PYQT, but a couple packages are giving me issues with installing. I have a python 3.5.1 virtual environment, and when I try to install PYQT4 it gives me the error (using pip, pip3, with and without --pre):
Could not find a version that satisfies the requirement pyqt4 (from versions: )
No matching distribution found for pyqt4
This isn't the only package that has given me this exact same error, but I can't recall atm what other packages gave me issues. (Another issue I often get with other packages is error: Unable to find vcvarsall.bat. I've been through all the questions regarding that error, installing visual c fails for me).
So I decided to try to download the zip and follow this guide: http://pyqt.sourceforge.net/Docs/PyQt4/installation.html , which has me following this guide to install SIP as a requirement: http://pyqt.sourceforge.net/Docs/sip4/installation.html#downloading .
So now I'm having more problems. Part of the installation process for SIP requires using a makefile. So I downloaded make from cygwin. I run python configure.py to generate the makefile (in the proper virtualenv), and I run make, but make never ends. It keeps reading this over and over again until I kill powershell or cmd:
cd sipgen
/usr/bin/make
make[453]: Entering directory '/cygdrive/c/Users/<username>/.virtualenvs/<envname>/sip-4.17'
That directory is the location of the makefile. I'm completely inexperienced with make, so any help would be appreciated. All of these problems are while using Python 3. My python 2 virtual environments are able to install most packages fine.
Edit: My mistake, in this case it's giving the same pip error with python 2 and 3.
I would like to install spyder (the math IDE for python, here 2.7) on my windows 8.1 machine.
I did install python starting from http://www.python.org/download/releases/2.7.6/;
I did install pip after having installed setuptools, following http://www.pip-installer.org/en/latest/installing.html for these installations;
I did change my path to add C:\Python27 and C:\Python27\Scripts to it, digging into the advanced parameters of my PC's properties. (By the way, I can't beleive the way you do this on windows has not changed for ages, with such a small input where you forgot to go at the end of the value when adding your path...)
I did install spyder
pip install spyder
But when launching it in command line (it's in the path :-) ), I ran through this error:
RuntimeError: Please check Spyder installation requirements:
PyQt4 4.4+ (or PySide 1.1.1+) is required.
Which is truly true. Though,
when trying to pip PyQt4 :
No distributions at all found for PyQt4
when trying to pip PySide, I have many errors, the root one seeming that it is unable to find nmake
Any piece of advice ?
To install PySide on Windows you can choose from the following options:
Download and install the packages from the releases page.
Use setuptools to install the egg binary packages:
c:> c:\Python27\Scripts\easy_install PySide
Use pip to install the wheel binary packages:
c:> c:\Python27\Scripts\pip install --use-wheel PySide
Details are here https://pypi.python.org/pypi/PySide#installing-pyside-on-a-windows-system
BTW: PyQt does not support setuptools or pip
I am not sure if its a proper answer, but you might want to take a look at PythonXY. It makes all these installation procedure a breeze.
From the details in your question, it looks like you are missing both PyQt4 and Qt itself.
There are binary installers for Windows available from the PyQt download page. These installers include both PyQt and Qt (as well as various other tools such as Qt Designer). The only things not included are the Qt documentation, and Python itself (which you seem to have already installed).
Just be careful to select the right installer from the list of Binary Packages: i.e. the one for Python-2.7, plus whatever architecture is appropriate for your system.