继续上篇的pyspark集成后,我们再来看看当今热的不得了的tensorflow是如何继承进pycharm环境的
参考: http://blog.csdn.net/include1224/article/details/53452824
思路其实很简单,说下要点吧
1. python必须要3.5 64位版本(上一篇直接装的是64位版本的Anaconda)
2. 激活3.5版本的python环境,用activate {env name}就行了
3. 在激活的环境中运行pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
具体版本见https://storage.googleapis.com/tensorflow
至此,tensorflow就安装到目标环境了
同样运行下demo代码:
1
2
3
4
5
6
7
8
9
|
import tensorflow as tf
hello = tf.constant( 'Hello, TensorFlow!' )
sess = tf.Session()
print (sess.run(hello))
a = tf.constant( 10 )
b = tf.constant( 32 )
print (sess.run(a + b))
sess.close() |
出处:https://www.cnblogs.com/aarond/p/tensorflow.html