anaconda提供了一个可视化GUI来管理anaconda环境(可用来管理python等工具版本)和虚拟环境Environments(主要用来管理pip包)。
anaconda的默认环境名为base。
使用以下命令创建新环境:
conda create -n env_name list of packages
其中
-n python364
python=3.6
例如,现在,我的anaconda默认的python是3.8版本,但是我想安装一个python 3.6的环境,则命令行运行:
conda create -n py364 python=3.6.4
解决方法
win打开C:\Users\用户名\.condarc,linux则找到~/.condarc,修改内容如下:
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- http://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true
show_channel_urls: true
解决方法:
最后创建环境成功如下。
联系客服