Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tensorflow installer (for Amazon Linux)
# install pyenv
sudo yum -y install gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel bzip2 sqlite
curl -L | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
# install pip
sudo easy_install pip
# configure pyenv local 3.6.0 in tensowflow directory
cd ~
mkdir tensorflow
cd tensorflow
pyenv install 3.6.0
pyenv local 3.6.0
# install tensorflow.
# list of packages are here:
pip install --ignore-installed --upgrade $TF_BINARY_URL
# testing tensorflow
python -c "import os; \
import tensorflow as tf; \
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'; \
c = tf.constant('Tensorflow works!'); \
sess = tf.Session(); \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment