I have tried to install PyQt5 using
pip install PyQt5
and
sudo -H pip install PyQt5
both of them give me the errors
ERROR: Could not find a version that satisfies the requirement PyQt5 (from versions: none)
ERROR: No matching distribution found for PyQt5
I use Ubuntu 18.04.
My python version is: Python 2.7.15rc1
I have already installed python3-pip and tried to install PyQt5 using
pip3 install PyQt5
I get the error
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3241, in <module>
@_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found and is required by the application
My python3 version is: Python3.6.7.
FaceHoof, первое, что Вам необходимо сделать:
— проверить правильность установки, это можно сделать с использованием следующих инструкций в IDLE (не терминале (не в интерактивном режиме) и не PyCharm)
>>> from PyQt5 import QtCore
>>>QtCore.PYQT_VERSION_STR
Здесь должен быть отражен номер версии пакета PyQt5
>>>QtCore.QT_VERSION_STR
Здесь версия QT
Добавлено через 4 минуты
Сообщение от FaceHoof
Could not find a version that satisfies the requirement pyqt5-tools (from versions: )
No matching distribution found for pyqt5-tools
Скорее всего данное сообщение появляется из-за различий версий PyQt5, pyqt5-tools и Qt, точно не знаю.
Проще удалить PyQt5 командой:
pip3 uninstall pyqt5
И установить заново:
pip3 install pyqt5
Добавлено через 4 минуты
Сообщение от FaceHoof
pip3 install pyqt5-tools
Далее pip3 install pyqt5-tools. Или действия аналогичные выше сказанному в случае возникновения проблем. Возможно потребуется обновить сам пакет pip командой python -m pip install —upgrade pip (или pip3)
Данная библиотека необходима так как в составе последних версий PyQt отсутствует «Дизайнерский пакет» QtDesigner.
Добавлено через 5 минут
Ну и экспериментируйте, читайте в Python это позволительно и удачи. Если что-то не получается или у Вас unix или mac, возможно, потребуются другие действия. Так же многое зависит от 32 или 64 битной версии python.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Comments
- Pip version: pip 9.0.1
- Python version: Python 2.7
- Operating system:
Description:
When I wanna install pyQt5 or PyQt4 This message is showing.
«Could not find a version that satisfies the requirement pyqt <>.
What I’ve run:
// REPLACE ME: Paste a log of command(s) you ran and pip's output, tracebacks, etc, here
That’s normal: if you look at the PyQt5’s page on PyPI, you’ll see that only pre-built binaries (wheels) are available (no sources), and those are for a limited set of Python versions / architectures (starting with Python 3.5). For Python 2, you’ll have to build manually from the sources available here.
run this code : pip3 install PyQt5
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
lock
bot
added
the
auto-locked
Outdated issues that have been locked by automation
label
Jun 2, 2019
lock
bot
locked as resolved and limited conversation to collaborators
Jun 2, 2019
Sometimes you get an error when you’re trying to install a Python package
using pip. It looks like this:
Could not find a version that satisfies the requirement (from versions:)
No matching distribution found for
Some probable reasons for this error are:
-
PyPI server isn’t responding to your requests. It can happen either because
the PyPI server is down or because it has blacklisted your IP address. This
happened to me once when I was trying installing packages on a server.
This can be fixed by using a proxy with pip. See the solution below. -
You’re running an older pip (especially on Mac). This can be fixed by
upgrading your pip.
See this post on Stack Overflow.
Thanks to Anupam Jain who pointed this in a comment. -
The package you’re trying to install is not available for your Python version.
-
The package is not available for your operating system. This is a rare case
and only happens when the package is not pure-Python, i.e. it’s been
partially written in C or Cython. Such a package needs to be compiled for
every operating system (Windows/Mac/Linux) and architecture (32-bit/64-bit).
Suppose a package has only been compiled for Windows 64-bit, then you’ll get
this error if you try to install it on Windows 32-bit, or any other
OS. -
The package is not present on PyPI server. In this case pip will not work. So
you’ll have to download and install the package manually from Github or wherever
it is available.
Solution¶
I had this issue because PyPI server had blacklisted the IP
of my hosting provider, the obvious solution was to make pip
install via a proxy.
But to see if that’s also the case with you, you can test it like this:
$ curl https://pypi.org
The requestors Network has been blacklisted due to excessive request volume.
If you are a hosting customer, please contact your hosting company's support.
If you are the hosting company, please contact infrastructure-staff@python.org to resolve
If you see the message similar to above, that means your IP has also been
blacklisted by https://pypi.org.
If you don’t see this message then the reason for the pip error could be that you’re using
an older version. See this post on Stack Overflow
for a solution.
Anyways, this can be fixed by using a proxy with pip.
Supplying a proxy address to pip
is easy:
$ pip install -r requirements.txt --proxy address:port
Above, address
and port
are IP address and port of the proxy.
To find proxies, just search Google for proxy list.
Other things that I tried¶
These are some other things that I tried to get rid of this issue.
Although they didn’t work for me, but they might work for you.
- Changing DNS resolver of my server.
This makes sense if your server’s DNS resolver can’t find PyPI servers. - Reconfiguring SSL, reinstalling CA certificates.
This makes sense if you don’t have updated CA certificates which are used by
PyPI servers. - Downloading packages using
wget
.
This is an alternative way to install Python packages. Download them viawget
and then install them usingpython setup.py install
. In my case, the server was
blacklisted by PyPI so I was getting a 403 Forbidden error. - Downloading packages using
curl
.
Alternative towget
. In my case I didn’t get a 403 error but rather it just
created invalid tarball files, instead of actually downloading them. - Downloading packages using
git
orhg
.
If your desired packages havegit
orhg
repositories that you can clone, this
is a good workaround.
I’m trying to install pyqt5 and I’m getting the following error :
$ sudo pip3 install pyqt5
Collecting pyqt5
From cffi callback <function _verify_callback at 0x7fbdc777f2f0>:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/OpenSSL/SSL.py", line 313, in wrapper
_lib.X509_up_ref(x509)
AttributeError: module 'lib' has no attribute 'X509_up_ref'
Could not find a version that satisfies the requirement pyqt5 (from versions: )
No matching distribution found for pyqt5
I have no idea how to tackle this one anymore.
My Os :
Linux version 4.13.0-38-generic (buildd@lgw01-amd64-042) (gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)) #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018
I’ve got python 2.7.14 and python 3.6.3
asked Apr 6, 2018 at 19:41
You most likely just need to update the OpenSSL
package or the setuptools
package. You can do this using:
$ pip install --upgrade setuptools
$ pip install --upgrade pyOpenSSL
If you come across the same error upon upgrading the pyOpenSSL
package, you may need to also update the cryptography
package:
$ pip install --upgrade crytography
Occasionally, pip
will not manage dependencies properly and thus upgrading packages manually in this fashion is required.
answered Apr 6, 2018 at 20:14
4
To Solve this Could not find a version that satisfies the requirement You need to update your pip and setup tools and that will resolve this error.
Contents
- Solution 1: Just update the pip
- Solution 2: Use this command.
- Solution 3: For Requirements.txt
- Solution 4: Make Sure the Right Python version Using
- Frequently Asked Questions
- Summary
Solution 1: Just update the pip
You just need to update the pip and your error will be resolved. Just follow this command.
If you are a windows user Then run this command.
python -m pip install --upgrade pip
Mac users who use pip and PyPI
curl https://bootstrap.pypa.io/get-pip.py | python
And then also upgrade setuptools after doing the above.
pip install --upgrade setuptools
Solution 2: Use this command.
On Debian-based systems, I’d try
apt-get update && apt-get upgrade python-pip
Red Hat Linux-based systems:
yum update python-pip
On Mac:
sudo easy_install -U pip
Solution 3: For Requirements.txt
If You are trying to install Requirements.txt and you are facing this error then You need to use -r in the command line. Just Like This.
pip install -r requirements.txt
And now, Your error will be resolved.
Solution 4: Make Sure the Right Python version Using
Please Make Sure You are Using Right Python Version In your Command line. If You have installed Python 3 and You are trying to use Python2 then You might face this error.
python3 -m pip install <your_pkg>
Frequently Asked Questions
- How to solve Could not find a version that satisfies the requirement error?
to solve Could not find a version that satisfies the requirement error If You are trying to install Requirements.txt and you are facing this error then You need to use -r in the command line. Just Like This: pip install -r requirements.txt And now, Your error will be resolved.
- Could not find a version that satisfies the requirement
to solve Could not find a version that satisfies the requirement error Please Make Sure You are Using Right Python Version In your Command line. If You have installed Python 3 and You are trying to use Python2 then You might face this error: python3 -m pip install <your_pkg>
Summary
The solution is simple you just need to update your PIP to the very latest version and then update setuptools will resolve this error. Comment below if you are still facing this error.
Also, Read
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path