pyCharm安装Tensorflow

null

1.注意最新的Python3.7余Tensorflow不兼容(因为关键字Async)
2.安装Python3.6
3.使用pip安装tf,如果出现超时,换pip源

1
pip install  tensorflow==1.11 -i https://pypi.tuna.tsinghua.edu.cn/simple/

测试:

1
2
3
4
5
6
import tensorflow as tf

if __name__ == '__main__':
x = [[2.]]
m = tf.matmul(x, x)
print("hello, {}".format(m))

image.png