pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/

I run sudo pip install git-review, and get the following messages:

Downloading/unpacking git-review
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement git-review
No distributions at all found for git-review
Storing complete log in /home/sai/.pip/pip.log

Does anyone has any idea about this?

  • git prompt not working in Android Studio terminal
  • How to use git clone with ssh protected gitolite server
  • Git Permission Issue in Terminal
  • Git push/clone not working using HTTPS without any sort of firewall/proxy only in Ubuntu
  • Code publish through jenkins for .net MVC solution in Ubuntu machine
  • AWS Elastic Beanstalk aws.push permission denied
  • howto solve git-samba-shared-repository-problem
  • How to correctly add 'git push' command to crontab - Ubuntu
  • 22 Solutions collect form web for “pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/”

    EDIT:

    The current version of PIP no longer has this issue. As of right now, version: 7.1.2 is the current version. Here is the PIP link:

    https://pypi.python.org/pypi/pip

    ORIGINAL FIX:

    I got this issue when trying to use pip==1.5.4

    This is an issue related to PIP and Python’s PYPI trusting SSL certificates. If you look in the PIP log in Mac OS X at: /Users/username/.pip/pip.log it will give you more detail.

    My workaround to get PIP back up and running after hours of trying different stuff was to go into my site-packages in Python whether it is in a virtualenv or in your normal site-packages, and get rid of the current PIP version. For me I had pip==1.5.4

    I deleted the PIP directory and the PIP egg file. Then I ran

    easy_install pip==1.2.1  
    

    This version of PIP doesn’t have the SSL issue, and then I was able to go and run my normal pip install -r requirements.txt within my virtualenv to set up all packages that I wanted that were listed in my requirements.txt file.

    This is also the recommended hack to get passed the issue by several people on this Google Group that I found:

    https://groups.google.com/forum/#!topic/beagleboard/aSlPCNYcVjw

    Check your proxy connection, I had a similar issue, then I changed my connection which wasn’t proxied and boom, of it started downloading and setting up the library

    I added –proxy command line option to point to the proxy and it’s working (pip version is 1.5.4 and python 2.7). for some reason it was not taking the shell env variables HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy.

    sudo pip --proxy [user:passwd@]proxy.server:port install git-review
    

    I had the same issue with pip 1.5.6.

    I just deleted the ~/.pip folder and it worked like a charm.

    rm -r ~/.pip/
    

    I had the same problem with pip==1.5.6. I had to correct my system time.

    # date -s "2014-12-09 10:09:50"
    

    I was able to fix this by upgrading my python, which had previously been attached to an outdated version of OpenSSL. Now it is using 1.0.1h-1 and my package will pip install.

    FYI, my log and commands, using anaconda and installing the pytest-ipynb package [1] :

    
    $ conda update python
    Fetching package metadata: ....
    Solving package specifications: .
    Package plan for installation in environment /Users/me/anaconda/envs/py27:

    The following NEW packages will be INSTALLED:
    openssl: 1.0.1h-1

    The following packages will be UPDATED:
    python: 2.7.5-3 --> 2.7.8-1
    readline: 6.2-1 --> 6.2-2
    sqlite: 3.7.13-1 --> 3.8.4.1-0
    tk: 8.5.13-1 --> 8.5.15-0

    Proceed ([y]/n)? y
    Unlinking packages ...
    [ COMPLETE ] |#############################################################| 100%
    Linking packages ...
    [ COMPLETE ] |#############################################################| 100%

    $ pip install pytest-ipynb
    Downloading/unpacking pytest-ipynb
    Downloading pytest-ipynb-0.1.1.tar.gz
    Running setup.py (path:/private/var/folders/4f/b8gwyhg905x94twqw2pbklyw0000gn/T/pip_build_me/pytest-ipynb/setup.py) egg_info for package pytest-ipynb

    Requirement already satisfied (use --upgrade to upgrade): pytest in /Users/me/anaconda/envs/py27/lib/python2.7/site-packages (from pytest-ipynb)
    Installing collected packages: pytest-ipynb
    Running setup.py install for pytest-ipynb

    Successfully installed pytest-ipynb
    Cleaning up...

    [1] My ticket about this issue; https://github.com/zonca/pytest-ipynb/issues/1

    it works!

    sudo pip –proxy=http://202.194.64.89:8000 install elasticsearch ;
    202.194.64.89:8000 is my PROXY,

    I faced same problem but that was related proxy. it was resolved by setting proxy.

    Set http_proxy=http://myuserid:mypassword@myproxyname:myproxyport
    Set https_proxy=http://myuserid:mypassword@myproxyname:myproxyport
    

    This might help someone.

    If your proxy is configured correctly, then pip version 1.5.6 will handle this correctly. The bug was resolved.

    You can upgrade pip with easy_install pip==1.5.6

    Extra answer: if you are doing this from chroot.

    You need source of random numbers to be able to establish secure connection to pypi.

    On linux, you can bind-mount host dev to chroot dev:

    mount --bind /dev /path-to-chroot/dev
    

    I also got this error while installing pyinstaller in a proxied connection. I just connect direct Internet connection(Using my dongle) and did that again.

     sudo pip install pyinstaller
    

    This worked for me.

    You might be missing a DNS server conf in /etc/resolv.conf

    make sure u can ping to:
    ping pypi.python.org

    if you’re not getting a ping try to add a DNS server to file…something like:

    nameserver xxx.xxx.xxx.xxx

    My explanation/enquiry is for windows environment.
    I am pretty new to python, and this is for someone still novice than me.
    I installed the latest pip(python installer package) and downloaded 32 bit/64 bit (open source) compatible binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and it worked.

    Steps followed to install pip, though usually pip is installed by default during python installation from http://www.python.org/downloads/
    – Download pip-7.1.0.tar.gz from https://pypi.python.org/pypi/pip.
    – Unzip and un-tar the above file.
    – In the pip-7.1.0 folder, run: python setup.py install. This installed pip latest version.

    Use pip to install(any feasible operation) binary package.
    Run the pip app to do the work(install file), as below:
    \python27\scripts\pip2.7.exe install file_path\file_name –proxy
    If you face, wheel(i.e egg) issue, use the compatible binary package file.
    Hope this helps.

    I had a similar problem, but in my case I was getting the error:

    Downloading/unpacking bencode
      Cannot fetch index base URL http://c.pypi.python.org/simple/
      Could not find any downloads that satisfy the requirement bencode
    No distributions at all found for bencode
    Storing complete log in /home/andrew/.pip/pip.log
    

    In my case I was able to fix the error by editing ~/.pip/pip.conf and changing http://c.pypi.python.org/simple/ to http://pypi.python.org/simple and then pip worked fine again.

    I got this error message in ~/.pip/pip.log

    Could not fetch URL https://pypi.python.org/simple/: connection error: [Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
      Will skip URL https://pypi.python.org/simple/ when looking for download links for regulargrid
    

    I fixed it by updating my ~/.pip/pip.conf. It accidentally pointed to cacert.pem file that did not exist and looked like this

    [global]
    cert = /some/path/.pip/cacert.pem
    

    I used to use the easy_install pip==1.2.1 workaround but I randomly found that if you’re having this bug, you probably installed a 32bit version of python.

    If you install a 64bit version of it by installing it from the source and then build you virtualenv upon it, you wont have that pip bug anymore.

    I too used the chosen solution (downgrading pip) to work around this issue until I ran into another seemingly unrelated issue caused by the same underlying problem. Python’s version of OpenSSL was out of date. Check your OpenSSL version:

    python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
    

    If the version is 0.9.7, that should verify that OpenSSL needs to be updated. If you know how to do that directly, great (but please let me know in a comment). If not, you can follow the advice in this answer, and reinstall python from the 64 bit/32 bit installer instead of the 32 bit only installer from python.org (I’m using python 3.4.2). I now have OpenSSL version 0.9.8, and none of these issues.

    Try doing reinstallation of pip :

    curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
    tar xvfz pip-1.2.1.tar.gz
    cd pip-1.2.1
    python setup.py install
    

    If curl doesnot work , you will have proxy issues , Please fix that it should work fine. Check after opening google.com in your browser in linux.

    The try installing

    pip install virtualenv
    

    In case you use a firewall, make sure outbound connections to port 443 are not blocked, e.g. run:

    sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
    

    I have met the same questions with you. When I realize it may be caused by unmatched version of numpy or pip, I uninstalled numpy and pip, then continue as this ‘https://radimrehurek.com/gensim/install.html’, at last I succeed!

    C:\Users\Asus>pip install matplotlib
    Downloading/unpacking matplotlib
      Cannot fetch index base URL https://pypi.python.org/simple/
      Could not find any downloads that satisfy the requirement matplotlib
    Cleaning up...
    No distributions at all found for matplotlib
    Storing debug log for failure in C:\Users\Asus\pip\pip.log
    

    I used ‘easy_install pip==1.2.1’ and it worked fine.

    C:\Users\Asus>easy_install pip==1.2.1
    Searching for pip==1.2.1
    Reading https://pypi.python.org/simple/pip/
    Best match: pip 1.2.1
    Downloading ...
    

    Then on using this command ‘pip install matplotlib’

    C:\Users\Asus>pip install matplotlib
    Downloading/unpacking matplotlib
      Downloading matplotlib-2.0.0b4.tar.gz (unknown size):
    

    If you’re running these commands in a Docker container on Windows, it may mean that your docker machine’s network connection is stale and needs to be rebuilt. To fix it, run these commands:

    docker-machine stop
    docker-machine start
    @FOR /f "tokens=*" %i IN ('docker-machine env') DO @%i
    
    Git Baby is a git and github fan, let's start git clone.