The TensorFlow requires Python(2.7 , 3.4+) so you have to install the Python before install TensorFlow. but the Python already installed in Ubuntu , so if you chose Ubuntu by your OS, you don't have to care about it !
There is many way to set up TensorFlow but I will use Anaconda which is a Python distribution that includes a large number of standard numeric and scientific computing packages.
here is anaconda download link , if you work in windows environment , it's OK you can download it before boot as Ubuntu , because Ubuntu can access your whole disk including disk which was installed windows
1. Open the terminal by searching
2. input code
python -V
and check the version of python
3. if your python2 version is 2.7, input code
bash Anaconda2-4.2.0-Linux-x86_64.sh
and install the anaconda( don't forget to move 'Anaconda2-4.2.0-Linux-x86_64.sh' file to home directory
4. then , you have to be the yes man! repeatedly press 'Enter' key and input yes
5. and then ! you have to set tensorflow virtual anaconda environment by inputting code
conda create -n tensorflow python=2.7
6. if you completely followed me, you can see this messages
7. then input two codes
source activate tensorflow
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
each code means activate virtual anaconda environment and select correct binary
8. and input last code to install tensorflow
pip install --upgrade $TF_BINARY_URL
9. if you wanna test that you did perfectly , turn on python and input following code
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
if whole system is well, you get 'Hello, TensorFlow!'
(To be frank , it doesn't test technical component of TensorFlow but just test functional part)
댓글 없음:
댓글 쓰기