# Install Tensorflow with Virtuelenv and Visual Studio Code on Mac
Photo by Stephen Leonardi on Unsplash - https://unsplash.com/photos/_NMJqIhNpno
Table of Contents
- Installing Tensorflow
- Set up Visual Studio Code
sudo easy_install pip pip install --upgrade virtualenv virtualenv --system-site-packages <targetDirectory> cd <targetDirectory> source ./bin/activate easy_install -U pip pip install --upgrade tensorflow
Test if the installation has worked
python # inside the python shell import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
This should show 'Hello, TensorFlow!' in the console.
If not, check out the official homepage for a solution.
Set up Visual Studio Code
Install the Visual Studio Python Extension
Set up the virtual environment
For more details, see the official site.
Tip: To see your path use 'echo $VIRTUAL_ENV'
When the setup settings are not working, simply activate the virtualenv in the terminal with
Thanks for reading my article! Feel free to leave any feedback!
Daniel is a LL.M. student in business law, working as a software engineer and organizer of tech related events in Vienna.
His current personal learning efforts focus on machine learning. Connect on: