将Anaconda与conda-forge结合使用在阻止亚马逊云的公司防火墙后面 [英] Using Anaconda with conda-forge behind a corporate firewall blocking Amazon cloud

查看:387
本文介绍了将Anaconda与conda-forge结合使用在阻止亚马逊云的公司防火墙后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 10系统上使用Anaconda环境安装tensorflow 1.9.0.不幸的是,我在防火墙后面,该防火墙阻止所有对Amazon云的访问(请不要问为什么).

I'm trying to use the Anaconda environment on a Windows 10 system to install tensorflow 1.9.0. Unfortunately, I'm behind a firewall that blocks all access to the Amazon cloud (please don't ask why).

我知道我可以从此处安装1.9.0版本,但是此存储库在很大程度上依赖于在conda-forge上.

I know that I can install version 1.9.0 from here but this repo heavily relies on conda-forge.

因此,为了避免这个问题,我正在使用以下命令(至少)安装tensorflow 1.8.0:

Thus, to circumvent this issue I'm using the following command to (at least) install tensorflow 1.8.0:

 conda install -c https://repo.continuum.io/pkgs/main/win-64/ tensorflow-gpu=1.8.0

这将产生以下输出:

解决环境:已完成

Solving environment: done

环境位置:d:\ Programs \ Anaconda \ Anaconda

environment location: d:\Programs\Anaconda\Anaconda

添加/更新了规格: -tensorflow-gpu = 1.8.0

added / updated specs: - tensorflow-gpu=1.8.0

将下载以下软件包:

package                    |            build
---------------------------|-----------------
bleach-1.5.0               |           py36_0          24 KB  conda-forge
html5lib-0.9999999         |           py36_0         182 KB  conda-forge
------------------------------------------------------------
                                       Total:         206 KB

将安装以下新软件包:

absl-py:             0.2.2-py36_0          defaults
astor:               0.6.2-py36_1          defaults
gast:                0.2.0-py36_0          defaults
grpcio:              1.12.1-py36h1a1b453_0 defaults
markdown:            2.6.11-py36_0         defaults
tensorboard:         1.8.0-py36he025d50_0  defaults
tensorflow-base:     1.8.0-py36h1a1b453_0  defaults
tensorflow-gpu-base: 1.8.0-py36h376609f_0  defaults
termcolor:           1.1.0-py36_1          defaults

以下软件包将被更新:

cudatoolkit:         8.0-4                 defaults --> 9.0-1                 defaults
cudnn:               6.0-0                 defaults --> 7.1.4-cuda9.0_0       defaults
numpy:               1.12.1-py36hf30b8aa_1 defaults --> 1.14.3-py36h9fa60d3_2 defaults
tensorflow:          1.1.0-np112py36_0     defaults --> 1.8.0-0               defaults
tensorflow-gpu:      1.1.0-np112py36_0     defaults --> 1.8.0-h21ff451_0      defaults

以下软件包将被降级:

bleach:              2.1.3-py36_0          defaults --> 1.5.0-py36_0          conda-forge
html5lib:            1.0.1-py36_0          defaults --> 0.9999999-py36_0      conda-forge

是否继续([y]/n)? y

Proceed ([y]/n)? y

不幸的是,软件包bleach和html5lib不在默认存储库中,而是在conda-forge(已阻止)上,结果是:

Unfortunately, the packages bleach and html5lib are not on the default repo but on conda-forge (which is blocked) instead, resulting in:

CondaHTTPError:URL的HTTP 503服务不可用 https://conda.anaconda. org/conda-forge/win-64/bleach-1.5.0-py36_0.tar.bz2 过去时间:00:00.287467

CondaHTTPError: HTTP 503 SERVICE UNAVAILABLE for url https://conda.anaconda.org/conda-forge/win-64/bleach-1.5.0-py36_0.tar.bz2 Elapsed: 00:00.287467

尝试检索此URL时发生HTTP错误. HTTP错误 通常是断断续续的,只需重试即可.

An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way.

CondaHTTPError:URL的HTTP 503服务不可用 https://conda.anaconda.org/conda-forge/win-64/html5lib-0.9999999-py36_0.tar.bz2 过去时间:00:00.272954

CondaHTTPError: HTTP 503 SERVICE UNAVAILABLE for url https://conda.anaconda.org/conda-forge/win-64/html5lib-0.9999999-py36_0.tar.bz2 Elapsed: 00:00.272954

尝试检索此URL时发生HTTP错误. HTTP错误 通常是断断续续的,只需重试即可.

An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way.

任何帮助将不胜感激.非常感谢你!

Any help would be highly appreciated. Thank you very much!

推荐答案

十一个月后,但是...

Eleven months later but...

尝试设置http_proxy和https_proxy环境变量.

Try to set http_proxy and https_proxy enviroment variables.

set http_proxy=http://user:password@yourcompanyproxy:port
set https_proxy=https://user:password@yourcompanyproxy:port

其他有用的技巧是设置conda而不验证ssl.

Other usefull tip is setup conda to don´t verify ssl.

conda config --set ssl_verify no

另一方面,如果上一个选项失败,则可以使用pip:

By the other hand, if the previous option failed you can use pip:

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org desired_package_name

但是,如果您有很多开发人员,最常见的是安装像sonatype Nexus这样的软件包管理器.

But, the most common if you have a lot of developers is to install a package manager, like sonatype Nexus.

conda config --prepend channels http://nxrmserver:8081/repository/conda-public/

希望可以帮助某人.

这篇关于将Anaconda与conda-forge结合使用在阻止亚马逊云的公司防火墙后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆