报错: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命令:
升级
卸载
最后,建议清理下.bashrc中的Anaconda路径。
conda环境使用基本命令:
conda config --show channels
conda config --show-sources
anaconda安装最新的TensorFlow版本
参考:javascript:void(0)
- 打开anaconda-prompt
- 查看tensorflow各个版本:(查看会发现有一大堆TensorFlow源,但是不能随便选,选择可以用查找命令定位)
anaconda search -t conda tensorflow
- 找到自己安装环境对应的最新TensorFlow后(可以在终端搜索anaconda,定位到那一行),然后查看指定包
anaconda show <USER/PACKAGE>
- 查看tensorflow版本信息
anaconda show anaconda/tensorflow
- 第4步会提供一个下载地址,使用下面命令就可安装1.8.0版本tensorflow
更新,卸载安装包:
删除虚拟环境
conda remove -n xxxx --all //创建xxxx虚拟环境
清理(conda瘦身)
conda clean
就可以轻松搞定!第一步:通过conda clean -p
来删除一些没用的包,这个命令会检查哪些包没有在包缓存中被硬依赖到其他地方,并删除它们。第二步:通过conda clean -t
可以将conda保存下来的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 –remove channels ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/’
查询镜像地址:conda config --show-sources
安装使用:pip install tensorflow;