您当前的位置: 首页 >  tensorflow

ZhangJiQun&MXP

暂无认证

  • 4浏览

    0关注

    1187博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

conda 常用命令, Non-zero exit code,You will need to adjust your conda configuration to .安装tensorflow

ZhangJiQun&MXP 发布时间:2019-07-02 15:24:10 ,浏览量:4

报错: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

anaconda安装最新的TensorFlow版本

参考:https://blog.csdn.net/qq_35203425/article/details/79965389

  1. 打开anaconda-prompt
  2. 查看tensorflow各个版本:(查看会发现有一大堆TensorFlow源,但是不能随便选,选择可以用查找命令定位)anaconda search -t conda tensorflow
  3. 找到自己安装环境对应的最新TensorFlow后(可以在终端搜索anaconda,定位到那一行),然后查看指定包anaconda show
  4. 查看tensorflow版本信息anaconda show anaconda/tensorflow
  5. 第4步会提供一个下载地址,使用下面命令就可安装1.8.0版本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瘦身)

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;

 

关注
打赏
1665659684
查看更多评论
立即登录/注册

微信扫码登录

0.0522s