conda create -n your_env_name python=3.7
python=x.x就是环境中要安装的python版本
如果还没使用清华镜像网站,会创建环境错误,因为默认国内通道下载python速度太慢,此时则要先:
添加清华镜像网站到路径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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
如果还不行,并且报错CondaHTTPError: HTTP 000 CONNECTION FAILED for url 然后把channels中的网址https都改成http(https协议对浏览器和服务器之间进行了通信加密) 此时重新conda create -n your_env_name python=3.7就不会报错了。 (写到这里突然发现!在将清华镜像的路径添加到conda的时候,直接用http而非https应该就不会出现后面的报错了?)vi ~/.condarc
vi文件中,键盘先按o进入编辑,编辑完按esc退出编辑并进入命令窗口,输入:wq即为保存文件并退出



