conda使用笔记

conda httperror http none none for url none Anaconda更新失败

在conda安装好之后,默认的镜像是官方的,由于官网的镜像在境外,访问太慢或者不能访问,为了能够加快访问的速度,这里选择了清华的的镜像。

在命令行中运行(设置清华的镜像)

conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config –set show_channel_urls yes

Anaconda更新失败

按上面的设置镜像源后需打开C:\Users\Administrator\.condarc这个文件删除 -defaults这一行
这里写图片描述
.condarc文件里应该是下面这样的内容
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
保存即可。

Anaconda3中Python3.5和Python2.7共存, 同时使用python2.x和python3.x两个版本开发项目

//添加Python2.7
conda create -n py27 python=2.7
conda config ? #查看可以使用的命令
conda config –show #可以看到channels等信息

//进入和退出py27:
(root) C:\Users\admin>activate py27
(py27) C:\Users\admin>deactivate

conda info -e #查看已有的环境
conda remove -n env_name –all #删除环境
conda install -n py27 anaconda #在py27下安装科学计算的包,包很多,慎重选择。

参考
(http://www.lqkweb.com/blog.php?id=18)
(http://www.lqkweb.com/blog.php?id=24)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值