报错:You will need to adjust your conda configuration to proceed. Use `conda config --show channels` to view your configuration's current state, and use `conda config --show-sources` to view config file locations.
报错: Non-zero exit code
报错:CondaHTTPError: HTTP 000 CONNECTION FAILED for url
等等,都是错,并且网上的回答很混乱,说清华镜像不能用个很多,自己搞不好就说镜像不行,真是的误导人。
清华镜像地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/;你进去看看,玩意地址更新了,你换上就是了。
先说几个conda命令:
conda update conda
conda update anaconda
conda update anaconda-navigator //update最新版本的anaconda-navigator
计算机控制面板->程序与应用->卸载 //windows
rm -rf anaconda //ubuntu
最后,建议清理下.bashrc中的Anaconda路径。 conda环境使用基本命令:
conda update -n base conda //update最新版本的conda
conda create -n xxxx python=3.5 //创建python3.5的xxxx虚拟环境
conda activate xxxx //开启xxxx环境
conda deactivate //关闭环境
conda env list //显示所有的虚拟环境
conda config --show channels
conda config --show-sources
参考:https://blog.csdn.net/qq_35203425/article/details/79965389
anaconda search -t conda tensorflow
anaconda show <USER/PACKAGE>
anaconda show anaconda/tensorflow
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.8.0
conda list #查看已经安装的文件包
conda update xxx #更新xxx文件包
conda uninstall xxx #卸载xxx文件包
conda remove -n xxxx --all //创建xxxx虚拟环境
conda clean
就可以轻松搞定!第一步:通过conda clean -p
来删除一些没用的包,这个命令会检查哪些包没有在包缓存中被硬依赖到其他地方,并删除它们。第二步:通过conda clean -t
可以将conda保存下来的tar包。
conda clean -p //删除没有用的包
conda clean -t //tar打包
创建环境
conda create --name your_env_name 1 输入y确认创建。
创建制定python版本的环境
conda create --name your_env_name python=2.7 conda create --name your_env_name python=3 conda create --name your_env_name python=3.5 1 2 3 创建包含某些包的环境
conda create --name your_env_name numpy scipy 1 创建指定python版本下包含某些包的环境
conda create --name your_env_name python=3.5 numpy scipy 1 列举当前所有环境
conda info --envs conda env list 1 2 进入某个环境
activate your_env_name 1 退出当前环境
deactivate 1 复制某个环境
conda create --name new_env_name --clone old_env_name 1 删除某个环境
conda remove --name your_env_name --all 但是安装用到的是:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
只需要这两个网址:其他的全部移除:
移除镜像网址:conda config –remove channels ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/’
查询镜像地址:conda config --show-sources
安装使用:pip install tensorflow;