无法获取索引库URL https://pypi.python.org/simple/〜安装Python 3 OS X之后

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法获取索引库URL https://pypi.python.org/simple/〜安装Python 3 OS X之后相关的知识,希望对你有一定的参考价值。

在我需要安装Pillow之前,一切都进行得很顺利。我执行了pip3 install pillow的常规命令,并且下载完美。唯一的问题是它会自动安装与python 2.7不兼容的最新版本。另外,PIL无法正常工作。所以我想我应该从主要网站上下载最新的python 3。完成此操作后,pip3 install命令不再起作用,并给我一个错误。

我假设升级过程已完成,如果这样,我不知道如何正确删除它。我一直在浏览阅读有关此问题的其他人,并已尝试了所有可能的方法。有些人过于技术化,我不知道他们在说什么或告诉做什么。我是从Windows计算机切换来的较新的mac用户。

OS X版本:10.10.5

Python:2.7.10

日志;

MacBook-Pro:src George$ pip3 install pillow Downloading/unpacking pillow Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pillow Cleaning up... No distributions at all found for pillow Storing debug log for failure in /Users/George/.pip/pip.log

/Library/Frameworks/Python.framework/Versions/3.4/bin/pip3 run on Wed May 27 15:39:27 2020
Downloading/unpacking pillow
  Getting page https://pypi.python.org/simple/pillow/
  Could not fetch URL https://pypi.python.org/simple/pillow/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:598)
  Will skip URL https://pypi.python.org/simple/pillow/ when looking for download links for pillow
  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'http.client.CannotSendRequest'>: Request-sent)
  Will skip URL https://pypi.python.org/simple/ when looking for download links for pillow
  Cannot fetch index base URL https://pypi.python.org/simple/
  URLs to search for versions for pillow:
  * https://pypi.python.org/simple/pillow/
  Getting page https://pypi.python.org/simple/pillow/
  Could not fetch URL https://pypi.python.org/simple/pillow/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:598)
  Will skip URL https://pypi.python.org/simple/pillow/ when looking for download links for pillow
  Could not find any downloads that satisfy the requirement pillow
Cleaning up...
  Removing temporary dir /private/var/folders/vz/2_2d8xqj2hqbwwbmdqscvt_80000gn/T/pip_build_George...
No distributions at all found for pillow
Exception information:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/req.py", line 1177, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/index.py", line 277, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
pip.exceptions.DistributionNotFound: No distributions at all found for pillow
答案

尝试使用pip install pillow在python2中安装此软件包。

以上是关于无法获取索引库URL https://pypi.python.org/simple/〜安装Python 3 OS X之后的主要内容,如果未能解决你的问题,请参考以下文章

Python pip错误:“无法获取索引基URL https://pypi.python.org/simple/”

Yahoo Finance API / URL 不起作用:Pandas DataReader 的 Python 修复

无法使用改造库获取数据

Android SDK 管理器在选择存储库时出现“无法获取 URL https://dl-ssl.google.com/android/repository/repository.xml”错误

Nexus - 没有索引的代理存储库?

如何获取 url 以直接下载 github 版本?