0

I am trying to install tensorflow for python on a Mac, and I am following the instructions provided on the website. I decided to use virtualenv because pip has been giving me issues lately, and the website recommended virtualenv as well. Although I apparently have downloaded tensorflow for Python 3, I also want to have it available in Python 2 (which I use more anyway). Here is what I have done so far:

$virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow
tensorflow$ pip install --upgrade tensorflow

I get the following message to show up: Requirement already up-to-date: tensorflow in /usr/local/lib/python3.6/site-packages (1.8.0)

If you have any suggestions or commands to run, that would be greatly appreciated.

0

1 Answer 1

1

If you want to create a virtual environment with python 2,

virtualenv -p /usr/bin/python2.7 my_project

and then activate your project,

source my_project/bin/activate

check the environment and then install tensorflow,

python --version
pip --version
pip list

pip install tensorflow
Sign up to request clarification or add additional context in comments.

3 Comments

Awesome -- that definitely helped! I was also wondering how to start working with tensorflow using virtualenv (I am completely new to using this), since the instructions say we need to "activate" the virtual environment every time?
@Jane Sully, virtual environment provides you an isolated play-ground in which nothing is installed in the beginning, except some fundamentals like python and pip. I don't really know what you want to accomplish so start building from ground up, install the necessary packages etc. If you want to learn more about virtualenvs, head here -> docs.python-guide.org/en/latest/dev/virtualenvs
Sounds great! Thanks for your help!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.