No distributions at all found for some package - python

error when installing some package but its actualy existing example django-ajax-filtered-fields==0.5
Downloading/unpacking django-ajax-filtered-fields==0.5 (from -r
requirements.example.pip (line 13)) Could not find any downloads
that satisfy the requirement django-ajax-filtered-fields==0.5(from
-r requirements.example.pip (line 13))
No distributions at all found for django-ajax-filtered-fields==0.5 Storing debug log for failure in /home/pd/.pip/pip.log
(peecs)pd#admin:~/proj/django/peecs$ pip install
django-ajax-filtered-fields==0.5 --allow-unverified
django-ajax-filtered-fields==0.5 Downloading/unpacking
django-ajax-filtered-fields==0.5 Could not find any downloads that
satisfy the requirement django-ajax-filtered-fields==0.5 Some
externally hosted files were ignored (use --allow-external
django-ajax-filtered-fields to allow). Cleaning up... No distributions
at all found for django-ajax-filtered-fields==0.5 Storing debug log
for failure in /home/pd/.pip/pip.log

Note that this error may also occure because you are using too old version of pip. Then it can be solved by:
pip install --upgrade pip
You can check your version by:
pip --version

I got the solution ,Try with --allow-unverified
syntax: pip install packagename=version --allow-unverified packagename
Some package condains insecure and unverifiable files. it will not download to the system . and it can be solved by using this method --allow-unverified. it will allow the installation.
Eg: pip install django-ajax-filtered-fields==0.5 --allow-unverified
django-ajax-filtered-fields

Proxy Settings
Still unsure if my issue has the same cause as with the OP, but one error message was the same:
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement Django
No distributions at all found for Django
Talking to a colleague exposed it was a site-security-based issue.
The following commands were required:
set https_proxy=*https proxy*
set http_proxy=*http proxy*
pip install Django
where *https proxy* and *http proxy* are appropriate URLs-with-ports for our site.
Downloading/unpacking Django
Installing collected packages: Django
Successfully installed Django
Cleaning up...

The only solution worked for me:
uninstall pip (pip uninstall pip)
download pip package from pypi (https://pypi.org/project/pip/)
execute python setup.py install (not using easy_install)
then you can install any package you want.

Inspecting the logs reveals the following line:
less .pip/pip.log
Could not fetch URL https://pypi.python.org/simple/WSGIUtils/: connection error: [Errno1] _ssl.c:493: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
In an earlier version of the comment I attributed this behaviour to https://pypi.python.org, but this is not the issue, since I can contact this site (from another computer!) with firefox and all certificates are OK. So this is probably a problem of some installations of pip---I encounter it unter SLES 11 which has (among other things) the "oldstable" openssl-0.9.8.

Try upgrading pip.
Version 7.1.2 does not have this issue.
easy_install pip==7.1.2

Lots of solutions to this, most effectively coming down to update PIP.
On MacOS (Sierra), This was my solution:
Download python3 installer of choice
Install Package (this includes a newer version of pip)
Remove old version of python from $PATH in ~/.bash_login (new one added by installer)
pip3 install packagename (no sudo)
After that I was still prompted to update pip and did so: pip3 install --upgrade pip

You can install the library manually:
git clone https://github.com/roddds/django-ajax-filtered-fields.git
then go to the folder:
pip install .

I did following to install Openpyxl in Python version 3.5 after the following error with command
pip install openpyxl --allow-unverified openpyxl
DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting openpyxl
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000044AF080>, 'Connection to pypi
.python.org timed out. (connect timeout=15)')': /simple/openpyxl/
Operation cancelled by user
C:\Softwares\Python\Scripts>set https_proxy=My proxy
C:\Softwares\Python\Scripts>pip install openpyxl --allow-unverified openpyxl
DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting openpyxl
Downloading openpyxl-2.4.8.tar.gz (156kB)
100% |████████████████████████████████| 163kB 3.7MB/s
Collecting jdcal (from openpyxl)
Downloading jdcal-1.3.tar.gz
Collecting et_xmlfile (from openpyxl)
Downloading et_xmlfile-1.0.1.tar.gz
Installing collected packages: jdcal, et-xmlfile, openpyxl
Running setup.py install for jdcal ... done
Running setup.py install for et-xmlfile ... done
Running setup.py install for openpyxl ... done
Successfully installed et-xmlfile-1.0.1 jdcal-1.3 openpyxl-2.4.8
That worked! Thanks Martin F for your tip.

Related

cant import sendgrid after pip installing it

I tried using pip install sendgrid, but got this error:
Collecting sendgrid
Using cached https://files.pythonhosted.org/packages/24/21/9bea4c51f949497cdce11f46fd58f1a77c6fcccd926cc1bb4e14be39a5c0/sendgrid-5.6.0-py2.py3-none-any.whl
Requirement already satisfied: python-http-client>=3.0 in /home/avin/.local/lib/python2.7/site-packages (from sendgrid) (3.1.0)
Installing collected packages: sendgrid
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/sendgrid-5.6.0.dist-info'
Consider using the --user option or check the permissions.
I used the --user as suggested and it run ok:
Collecting sendgrid
Using cached https://files.pythonhosted.org/packages/24/21/9bea4c51f949497cdce11f46fd58f1a77c6fcccd926cc1bb4e14be39a5c0/sendgrid-5.6.0-py2.py3-none-any.whl
Requirement already satisfied: python-http-client>=3.0 in /home/avin/.local/lib/python2.7/site-packages (from sendgrid) (3.1.0)
Installing collected packages: sendgrid
Successfully installed sendgrid-5.6.0
However, now, when running IPython, I can't import sendgrid...
ImportError: No module named sendgrid
pip -V = pip 19.0.3
This is a very useful command pip install --ignore-installed <package>
It will make your life easy :)
Solved.
It required another package that I missed: pip install python-HTTP-Client.
After that I no longer needed the --user and the imports worked fine

Python packages hash not matching whilst installing using pip

I am using pip to install all my python packages but get error as shown in the trace below. What is the problem and how can I solve it?
usr#comp:~$ pip install flask
Collecting flask
Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from flask)
Using cached itsdangerous-0.24.tar.gz
Collecting click>=2.0 (from flask)
Using cached click-6.6.tar.gz
Collecting Werkzeug>=0.7 (from flask)
Using cached Werkzeug-0.11.11-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/lib/python2.7/dist-packages (from Jinja2>=2.4->flask)
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
Werkzeug>=0.7 from https://pypi.python.org/packages/a9/5e/41f791a3f380ec50f2c4c3ef1399d9ffce6b4fe9a7f305222f014cf4fe83/Werkzeug-0.11.11-py2.py3-none-any.whl#md5=c63a21eedce9504d223ed89358c4bdc9 (from flask):
Expected md5 c63a21eedce9504d223ed89358c4bdc9
Got 13a168aafcc43354b6c79ef44bb0dc71
There is a similar problem (Why does pip fail with bad md5 hash for package?) from 2013 the solution that I tried that worked for me is this:
sudo pip install --no-cache-dir flask
given by attolee
The problem here is the Python package was updated with new hash value while pip was trying to install the Python package using the old hash value cached in pip cache directory. This cache needs to be purge before the pip install attempt. So the full solution is:
python -m pip cache purge
python -m pip install <package>
--no-cache-dir did not work for me in raspberry pi 4 at first.
Found that the problem was due to unexpected network change/failure during pip installation
I had to download the broken .whl file manually with wget
and install it like below:
sudo pip install scipy-1.3.0-cp37-cp37m-linux_armv7l.whl
followed by
sudo pip install --no-cache-dir keras
Then it worked.
Looks like a cache problem, the cached package is different from REQUIREMENTS.
Perhaps caused by last updates interruption.
I did this which fixed my problem:
rm ~/.cache/pip -rf
You need to upgrade your pip into the newer version:
Using this command:
python -m pip install -upgrade pip
for Mac/Linux operating system and use
python -m pip install --upgrade tensorflow
for Windows to update your pip. Then run your command
pip install flask
In case you got this error while using pipenv try
$ pipenv --clear
$ pipenv lock
$ pipenv install
first, try to upgrade your pip then install the library
python -m pip install -upgrade pip
if it didn't work just try to install it without the cash
pip install --no-cache-dir the_library_name
I got the error during installing panads
You need to remove the cache and reinstall .
pip install --no-cache-dir flask
I had a similar issue for a different module. It was caused by network failure. My fix was nothing complex but another attempt at installing it and it worked.
maybe pipiserver(where you pip install from) upload a pkg for example flask-1.0.0.tar.gz, and rm is upload a new flask-1.0.0.tag.gz,if new pkg code has changed ,the hash must be different,there is two ways:
installl an older pkg version =, pip install flask==0.0.9
wait new pkg release flask==1.0.1 or cache expiration.
I have tried to clear pip cache with "-m pip cache purge" and using the "--no-cache-dir" argument but it was not helping.
In my case it was VPN being active during the attempts to install the package. As soon as I have turned it off everything worked as expected.

installing python packages have issue in md5

I'm using Windows and when I want Install packages I got below error:
pip install django
Requirement already satisfied (use --upgrade to upgrade): django in c:\python27\lib\site-packages
C:\code\Djangotest\amar-e-simples-master>pip install django --upgrade
Collecting django
Downloading Django-1.9.7-py2.py3-none-any.whl (6.6MB)
6% |# | 399kB 3.3MB/s eta 0:00:02
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
django from https://pypi.python.org/packages/e6/f9/154e1460c4a95c90ab28ead50314161ea2c4016f3561033b41f687f0a76d/Django-1.9.7-py2.py3-none-any.whl#md5=5224b6f237a9e46a84fc0f9921f678ae:
Expected md5 5224b6f237a9e46a84fc0f9921f678ae
Got f603e16057383b3ad12d8bda84492fbb
what to do with this problem (In windows)?
If you get an error like pip: error: no such option: --hash, you are using too old a version of Pip, use the following command to upgrade:
$ pip install --upgrade pip
On Windows the recommended command is:
python -m pip install --upgrade pip
After the update, if the this error appeared again,
use "--no-cache-dir" when you upgrade/install:
pip --no-cache-dir install YOUR-PACKAGENAME
or
pip --no-cache-dir install --upgrade YOUR-PACKAGENAME
A good reason for the hash to be different is if you use a platform that isn’t covered by the existing hashes for a package that has wheels.

errors when installing Python packages

When I am using the pip-python install package_name command to install python package, it shows:
You are using pip version 6.1.1, however version 8.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip'
command. Collecting package-name
/usr/lib/python2.6/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning Could not find a version that satisfies the
requirement package-name (from versions: ) No matching distribution
found for package-name
However, I have already updated the pip version to 8.0.3. Can any one help with this?

Not able to search python package pmock using pip

I'm trying to install python package pmock.
Using following command:
sudo pip install pmock
However, I'm getting following error:
Collecting pmock
Getting page https://pypi.python.org/simple/pmock/
Could not find a version that satisfies the requirement pmock (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pmock to allow).
Cleaning up...
No matching distribution found for pmock
What is the correct way to install python package using pip?
This is one of the common issues coming via pip installtions, generally django setup also throws this error when setting up environment via requirements.txt.Basic solution is to allow external and unverified option too
try external hosted files this way :
sudo pip install pmock --allow-external pmock --allow-unverified pmock

Categories