[PYTHON] TensFlow Preferences Note

It is a memo of the environment construction procedure of TensFlow

procedure

--Install python 3.5.2 (I referred to here

brew update && brew upgrade
brew install pyenv
echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.bash_profile
echo 'export PATH="${PYENV_ROOT}/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
exec $SHELL -l

pyenv install anaconda3-4.0.0
pyenv global anaconda3-4.0.0

pyenv global anaconda3-4.0.0
pyenv install -l
pyenv install 3.5.2
pyenv global 3.5.2  # 3.5.Use 2

Now install python3.5.2.

--TensFlow install Refer to here

$ conda create -n tensorflow python=3.5
$ conda install -c conda-forge tensorflow

Confirmation after install. After starting the console, try running the TensFlow sample.

$ python
>>>import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42

Recommended Posts

TensFlow Preferences Note
PyCharm Preferences Note
Note
Note
Note
Django note 4
pyenv note
GroupBy Note
argparse note
Django Note 5
Note: Python
Ansible Note
Python note
Django Note 1
direnv note
Django note 3
Django note 2
[Note] RepresenterError