Plotly安装无法建立新连接

时间:2017-04-24 22:05:27

标签: python-2.7 proxy install plotly http-proxy

我通常在我的工作场所使用代理,以便我:

C:\myPath>echo %https_proxy%
http://myUser:myPassword@myProxy:myPort

现在我在家里(这意味着......没有代理!)我正在尝试安装一个软件包(“情节”):

C:\myPath>conda install -c plotly plotly=1.3.2
Fetching package metadata ...

CondaHTTPError: HTTP None None
for url <None>

An HTTP error occurred when trying to retrieve this URL.
ProxyError(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /plot
ly/win-64/repodata.json (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<requests.packages.urllib3
.connection.VerifiedHTTPSConnection object at 0x0000000004D786A0>: Failed to establish a new connection: [Errno 11004] g
etaddrinfo failed',)))",),)

为了删除代理设置而不删除我尝试的环境变量:

set http_proxy = ""
set https_proxy= ""

但情况并没有改变。 我也尝试过:

C:\myPath>pip install plotly
Collecting plotly
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot conne
ct to proxy.', NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0
x0000000003C6C400>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))': /simple/plotly/

问题是: - 我的代理设置有问题吗? - 如果是,我该如何更改?

1 个答案:

答案 0 :(得分:0)

我以一种非常简单的方式解决了这个问题。错误是我删除代理的方式。我设置:

C:\myPath>set https_proxy=

和命令

C:\myPath>conda install -c plotly plotly=1.3.2

工作!

警告:命令http(s)_proxy=必须包含无空格