Collecting package metadata (current_repodata.json): fail亲测成功

在Ubantu中创建anaconda虚拟环境时报错:

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.
Collecting package metadata (current_repodata.json): fail亲测成功_第1张图片

 原因:在linux中使用了代理,设置一下proxy_servers:解决,具体步骤如下:

~$ gedit ~/.condarc

编辑输入:

ssl_verify: false
channels:
  - defaults

proxy_servers:
  http: http://127.0.0.1:7890
  https: http://127.0.0.1:7890

代理网址proxy_servers:为自己设置的,注意http和https

查看两种方法:

1. Ubantu上在设置-网络-网络代理 里面查看

Collecting package metadata (current_repodata.json): fail亲测成功_第2张图片

 

2.直接命令行输入搜索:出现网址

env | grep -i "_PROXY"

 注意最后创建的时候,需要打开(linux里面)

你可能感兴趣的:(1024程序员节)