Skip to content

Instantly share code, notes, and snippets.

@fijiaaron
Last active April 29, 2022 06:19
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fijiaaron/0755a3b28b9e8aaf1cd9d4181c3df346 to your computer and use it in GitHub Desktop.
Tensorflow setup

GET STARTED WITH TENSORFLOW

Python 3.6 is needed by Tensorflow

Setup

install homebrew on mac

https://brew.sh/

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

install pyenv and pyenv-virtualenv

https://github.com/pyenv/pyenv https://github.com/pyenv/pyenv-virtualenv

brew install pyenv
brew install pyenv-virtualenv

initialize pyenv

eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

install python 3.6 with pyenv

pyenv install 3.6.5

create a virtualenv for using tensorflow

pyenv virtualenv 3.6.5 tf

use the virtualenv

pyenv activate tf

upgrade pip

pip install --upgrade pip

use pip to install tensorflow

https://www.tensorflow.org/install/pip

pip install tensorflow

install jupyter for web interface

https://jupyter.org/install

pip install jupyter

launch jupyter

jupyter notebook

use tensorflow in your app

import tensorflow as tf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment