Anaconda创建虚拟环境

Windows利用Anaconda创建虚拟环境时报错:

Fetching package metadata …

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/main/win-64/python-3.6.7-h9f7ef89_2.tar.bz2>
Elapsed: -

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.

问题原因:
Anaconda镜像源在国外,网络不稳定,更换国内镜像源

解决方法:
Step 1 :在命令行中输入并运行:(清华大学镜像)
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

Step 2 :更改配置文件
按上面的设置镜像源后,再打开C:\Users\Administrator.condarc这个文件,删除 -defaults这一行
删除后的.condarc文件
Step 3 :安装
cmd:conda create -n oop python=3.6
conda env list

Step 4 :激活
cmd:activate oop
conda list

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值