Anaconda上的Python 3-无法使用pip安装软件包

时间:2018-08-08 19:59:02

标签: python-3.x pip anaconda

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

我已经重新安装了anaconda并更新了所有内容-aconda导航器,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个小时,但没有成功。有谁知道会发生什么?

1 个答案:

答案 0 :(得分:1)

可能是防火墙禁用了pip。 Conda和pip是不同的软件包管理器,因此有所不同。您可能也有多个python。

Here与您的问题非常相似。

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