python pip installation error 'cannot fetch ba

2019-09-07 05:12发布

问题:

fairly new user but have basic understanding of command line/python. when attempting to install pip through windows 8 powershell get the following error message:

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

other instances of similar question seem to suggest something to do with proxy and then some more detailed linux instructions. i am unfamiliar with 'proxy' though if it's relevant i have a VPN extension in chrome. could somebody please suggest in simple, beginner language why i'm getting this error message/what the workaround and command prompt line would be?

appreciate it

contents of error log:


 get-pip.py run on 11/18/14 03:27:33
    Downloading/unpacking pip
      Getting page https://pypi.python.org/simple/pip/
      Could not fetch URL https://pypi.python.org/simple/pip/: connection error: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
      Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
      Getting page https://pypi.python.org/simple/
      Could not fetch URL https://pypi.python.org/simple/: connection error: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
      Will skip URL https://pypi.python.org/simple/ when looking for download links for pip
      Cannot fetch index base URL https://pypi.python.org/simple/
      URLs to search for versions for pip:
      * https://pypi.python.org/simple/pip/
      Getting page https://pypi.python.org/simple/pip/
      Could not fetch URL https://pypi.python.org/simple/pip/: connection error: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
      Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
      Could not find any downloads that satisfy the requirement pip
    Cleaning up...
      Removing temporary dir c:\users\xxxx\appdata\local\temp\pip_build_xxxx...
    No distributions at all found for pip
    Exception information:
    Traceback (most recent call last):
      File "c:\users\xxxx\appdata\local\temp\tmpb1cvmx\pip.zip\pip\basecommand.py", line 122, in main
        status = self.run(options, args)
      File "c:\users\xxxx\appdata\local\temp\tmpb1cvmx\pip.zip\pip\commands\install.py", line 278, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "c:\users\xxxx\appdata\local\temp\tmpb1cvmx\pip.zip\pip\req.py", line 1177, in prepare_files
        url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
      File "c:\users\xxxx\appdata\local\temp\tmpb1cvmx\pip.zip\pip\index.py", line 277, in find_requirement
        raise DistributionNotFound('No distributions at all found for %s' % req)
    DistributionNotFound: No distributions at all found for pip

回答1:

The problem is that the bundled SSL certificates seem to be out of date. Check that you are following the latest installation instructions and update your openssl installation.

Or try the solution outlined in this question: https://stackoverflow.com/a/20874741/2898712.