【问题标题】:Cannot fetch index base URL https://pypi.python.org/simple/ ~ After Installing Python 3 OS X无法获取索引基础 URL https://pypi.python.org/simple/ ~ 安装 Python 3 OS X 之后
【发布时间】:2020-05-27 22:48:57
【问题描述】:

在我需要安装 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

【问题讨论】:

    标签: python python-2.7 pip


    【解决方案1】:

    尝试使用pip install pillow在python2中安装这个包。

    【讨论】:

      【解决方案2】:

      pip3 旨在与python 3 一起使用。请改用pip。您还可能希望使用pyenvconda/miniconda,这样您就不会在所有工作中都使用您的系统python,因为许多软件包可能会导致不兼容。编码愉快!

      【讨论】:

        猜你喜欢
        • 2014-07-03
        • 2013-03-08
        • 2019-09-30
        • 2019-03-22
        • 2014-02-13
        • 2015-01-15
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多