errors when installing Python packages - python

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?

Related

I am getting pip version upgrade message while installing pygmaps

I am getting this error while installing pygmaps package in pycharm.
Could not find a version that satisfies the requirement pygmaps (from versions: )
No matching distribution found for pygmaps
You are using pip version 10.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have already upgraded pip version to 19.1.1, but still showing this error.
pip install git+https://github.com/thearn/pygmaps-extended can you try this one ?
if it doesnt work
https://code.google.com/archive/p/pygmaps/downloads go to this link and download it manually and add to your site-packages

Upgrading pip on mac with an ssl certificate problem

So I wanted to upgrade my pip after seeing the error below(1), so I followed the instructions but then the error popped up saying something was wrong with my ssl certificate and all.
All the other posts i looked at only had solutions for windows, but am a mac user. I tried downloading the file directly from pypi.python/simple/pip/ but its just sitting in my downloads folder and I didn't know where to put it to run that version instead.
Results:
**(1)You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
C02HG1BBDJWT:~ Sai$ pip install --upgrade pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Requirement already up-to-date: pip in /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.**
As you see I just got the ssl error message and another prompt to upgrade pip.
pip install --upgrade pip installs from PyPI regardless of where you have downloaded a wheel. To install from a wheel run
pip install --upgrade /path/to/downloaded/pip.whl

Cannot upgrade PIP in virtual environment

I am trying to upgrade pip in a virtual environment. I am using the venvburrito wrapper, in an ubuntu 14.04 machine. When I try to update it I get the following error:
(virtual_env) ubuntu#ip-xxxxxxx:~$ pip install pip --upgrade
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.2
Not uninstalling pip at /home/ubuntu/.venvburrito/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg, outside environment /home/ubuntu/.virtualenvs/virtual_env
Successfully installed pip-8.1.2
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
If I try it with sudo, inside the virtual environment, I get the following error:
(virtual_env) ubuntu#ip-xxxxxxx:~$ sudo pip install --upgrade pip
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Requirement already up-to-date: pip in ./.local/lib/python2.7/site-packages
/home/ubuntu/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
When I do it outside the virtual environment, it installs correctly.
Any help will be much appreciated.
Thanks
Try this one, it worked for me.
(inside virtualenv):easy_install -U pip
or
(inside virtualenv):easy_install pip
sometimes this helps(I had similar issue pip not upgrading and 1st command worked for me):
python -m ensurepip
or
python -m ensurepip --upgrade
Try installing it as follows, within your virtualenv:
curl https://bootstrap.pypa.io/get-pip.py | python
Seen a lot of problems with pip that all seem to be fixed by running it as a python module instead of directly:
python -m pip install --upgrade pip

Why am I getting InsecurePlatformWarning on mac?

when I ran pip freeze I got the following warning:
/Library/Python/2.7/site-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
When I follow the url to here, it seems to suggest could ignore it. Is that right? Is this something I need to address?
do as followed:
brew install openssl
ln -s /usr/local/Cellar/openssl/1.0.2c/include/openssl /usr/local/include/openssl
pip install --upgrade urllib3
pip install pyopenssl ndg-httpsclient pyasn1

No distributions at all found for some package

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.

Categories