【问题标题】:Python 3 on Anaconda - Cant install packages using pipAnaconda 上的 Python 3 - 无法使用 pip 安装包
【发布时间】:2018-08-08 19:59:02
【问题描述】:

我在新计算机(Windows 10 64 位)上安装了 anaconda 发行版,但无法通过 anaconda 提示符安装 python 包。

我已经重新安装了 anaconda 并更新了everyhting - aconda navigator、pip、pip3 等。我在网上尝试了至少 10 种可能的解决方案,但似乎都没有。

我收到以下错误:

(base) C:\Windows\system32>pip install Scrapy
Collecting Scrapy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/scrapy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/scrapy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/scrapy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/scrapy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/scrapy/
  Could not find a version that satisfies the requirement Scrapy (from versions: )
No matching distribution found for Scrapy

(base) C:\Windows\system32>pip3 install tensorflow
Collecting tensorflow
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

对于我尝试安装的每个软件包。

Python 版本:Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

(base) C:\Windows\system32>conda list anaconda$
# packages in environment at C:\Users\vinic\Anaconda3:
#
# Name                    Version                   Build  Channel
anaconda                  custom           py36h363777c_0

编辑:如果我使用conda install <package>,它似乎可以工作,有什么不同吗?

我现在尝试修复这个问题大约 3 个小时,但没有成功。有谁知道会发生什么?

【问题讨论】:

    标签: python-3.x pip anaconda


    【解决方案1】:

    可能是防火墙禁用了pip。 Conda 和 pip 是不同的包管理器,因此存在差异。您可能还拥有不止一条蟒蛇。

    Here 与您的问题非常相似。

    尝试使用代理作为链接问题中的最佳答案。禁用防火墙或允许 pip 也应该有效。

    【讨论】:

    • 我停用了防火墙,我得到同样的错误,然后我会尝试代理的事情
    猜你喜欢
    • 2020-05-10
    • 1970-01-01
    • 2014-10-17
    • 2021-01-29
    • 1970-01-01
    • 1970-01-01
    • 2018-05-17
    • 2018-12-28
    相关资源
    最近更新 更多