繼續上篇的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