服务器安装conda环境遇到代理PROXY问题及解决方案
目录
- 背景
- 1: 创建环境时出现ProxyError
- 解决方案
- 2:安装依赖时出现ProxyError
- 解决方案:
背景
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
使用的是组里的服务器,主要是在创建虚拟环境以及在已创建的虚拟环境中使用运行时都出现了同样的ProxyError,主要是因为conda没法处理代理,因此得要用户手动修改**.condarc**文件。一共分为两步
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy configuration settings.
1: 创建环境时出现ProxyError
~$ conda create -n nn Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
解决方案
首先进入**.condarc**文件,通常为空
~$ vim .condarc
这里对**.condarc**的修改如下:
channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
之后conda可以创建虚拟环境,本以为一切ok准备安装一些依赖包的时候,ProxyError再次出现。
2:安装依赖时出现ProxyError
安装pytorch时错误再次出现
~$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
解决方案:
同样是对**.condarc**文件进行修改,首先查看自己的代理ip
~$ echo $http_proxy http://...
复制打印出的代理ip地址并添加到**.condarc**配置文件中。(地址都是http,不是https)
proxy_servers: http: http://... https: http://... ssl_verify: False
以上就是服务器安装conda环境遇到代理PROXY问题及解决方案的详细内容,更多关于服务器安装conda PROXY的资料请关注其它相关文章!
您可能感兴趣的文章
- 02-02hadoop动态增加和删除节点方法介绍
- 02-02干货 | Linux新手入门好书推荐
- 02-02linux系统下MongoDB单节点安装教程
- 02-02Linux下nginx生成日志自动切割的实现方法
- 02-02Centos 6中编译配置httpd2.4的多种方法详解
- 02-02CentOS7 下安装telnet服务的实现方法
- 02-02分布式Hibernate search详解
- 02-02Hadoop对文本文件的快速全局排序实现方法及分析
- 02-02CentOS6.3添加nginx系统服务的实例详解
- 02-02Hadoop编程基于MR程序实现倒排索引示例


阅读排行
推荐教程
- 12-07Tomcat启动报错:严重: Unable to process Jar entry [m
- 12-07解决tomcat启动报错:一个或多个listeners启动失败问题
- 12-07一文教你怎么选择Tomcat对应的JDK版本
- 12-07Tomcat配置IPV6的实现步骤
- 12-07tomcat启动报错jar not loaded的问题
- 02-02CentOS7 下安装telnet服务的实现方法
- 12-11docker存储目录迁移示例教程
- 12-15Docker-Compose搭建Spark集群的实现方法
- 12-07Tomcat部署war包并成功访问网页详细图文教程
- 01-07windows server 2008安装配置DNS服务器




