anaconda安装tensorflow问题: Could not find a version that satisfies the requirement tensorboard

Posted liangxiyang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了anaconda安装tensorflow问题: Could not find a version that satisfies the requirement tensorboard相关的知识,希望对你有一定的参考价值。

背景:想要为下载的anaconda安装tensorflow

使用命令 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow

技术图片

报错如下:

技术图片

 解决办法:创建一个虚拟虚拟环境,在虚拟环境中安装tensorflow,然后使用pycharm创建项目,指定项目的运行环境为刚才创建的虚拟环境。

一:创建虚拟环境:conda create -n test python=3.5    -n后面是虚拟环境的名字   python=指定虚拟环境使用的python版本

为虚拟环境安装tensorflow:

  1. 进入虚拟环境:activate test
  2. 升级pip:python -m pip install --upgrade pip
  3. 查看当前安装了那些包:pip list
  4. 安装tensorflow:
    1. $ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
      $ conda config --set show_channel_urls yes
    2. 
      使用上面两行命令添加镜像
    3. 使用命令安装:conda install tensorflow
  5. 再次查看安装包:pip list

这样,不仅可以为创建的虚拟环境安装tensorflow,也可以直接为anaconda安装tensorflow库

 

二:创建项目。并选择改虚拟环境:

PyCharm也能很方便的和anaconda的虚拟环境结合,在Setting => Project => Project Interpreter 里面修改 Project Interpreter , 点击齿轮标志再点击Add Local为你某个环境的python.exe解释器就行了.

 技术图片

 

 比如你要在learn环境中编写程序, 那么就修改为C:UsersAdministratorAppDataLocalcondacondaenvslearn, 可以看到这时候下面的依赖包也变成了learn环境中的包了.接下来我们就可以在pycharm中愉快的编码了。

技术图片

 

 ***************不积跬步无以至千里 ***************

以上是关于anaconda安装tensorflow问题: Could not find a version that satisfies the requirement tensorboard的主要内容,如果未能解决你的问题,请参考以下文章

tensorflow 安装不正确

anaconda下安装的TensorFlow没有代码补全解决方案

Anaconda安装教程+Tensorflow教程

Win10系统 安装Anaconda+TensorFlow+Keras

如何让 Keras 在 Anaconda 中使用 Tensorflow 后端?

windows10安装Anaconda+TensorFlow(CPU)+keras+Pycharm