真是每台机子都有他的脾气,按照网上的教程不断出错。。。。。一直在网上交教程,找解决问题方法,终于,还是装好了
1按照anaconda3这里不再写了,主要是按照tensorflow
2打开终端,更换源(速度快些)
输入
conda config --
add
channels https://mirrors
.tuna
.tsinghua
.edu
.cn
/anaconda/pkgs/main/
conda config -- add channels https://mirrors .tuna .tsinghua .edu .cn /anaconda/pkgs/free/
conda config -- set show_channel_urls yes
conda config -- add channels https://mirrors .tuna .tsinghua .edu .cn /anaconda/pkgs/free/
conda config -- set show_channel_urls yes
![](https://i-blog.csdnimg.cn/blog_migrate/c25bee990574c3f186c774797f3b926c.png)
3创建一个名为flappbird的环境(大家可以更换成自己的,当时是参照网上的一个教程安装的,一般命名为tensorflow)
conda create -n flappbird python
=
3.6
![](https://i-blog.csdnimg.cn/blog_migrate/c48d749c4b01640afec57dedcfece0c8.png)
4激活环境
source
activate flappbird
5安装tensorflow
conda install
-n
flappbird
-c
https:
//conda.anaconda.org/jjhelmus tensorflow
![](https://i-blog.csdnimg.cn/blog_migrate/f7ebaaca9fcee9a8934fc33e04c3cd59.png)
6重新打开终端
激活环境
source
activate flappbird
7进入python环境
![](https://i-blog.csdnimg.cn/blog_migrate/fb0a2138f24f7b4b621d8d63fe8595f5.png)
8
输入
import
tensorflow
as
tf
hello = tf.constant( 'Hello, TensorFlow!' )
sess = tf.Session()
print(sess.run(hello))
hello = tf.constant( 'Hello, TensorFlow!' )
sess = tf.Session()
print(sess.run(hello))
![](https://i-blog.csdnimg.cn/blog_migrate/6c1348746dd5f5cec665fcffea13f3cc.png)
成功