ImportError: No module named tensorflow - Cannot install Tensorflow

I am trying to install tensorflow on mac and this gives me this error.

ImportError: no module named tensorflow

Here is what I did in the terminal

sudo easy_install pip sudo easy_install --upgrade six export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py3-none-any.whl sudo -H pip3 install --upgrade $TF_BINARY_URL 

After that, I try to run python and tensorflow to test my installation. This does not work. I spent 3 hours on the problem.

0
source share
2 answers

Try installing through Anaconda ...

Enter this in the terminal

 export PATH=~/anaconda2/bin:$PATH OR export PATH=~/anaconda3/bin:$PATH 

And then

 conda install -c https://conda.anaconda.org/jjhelmus tensorflow 

This worked for me by trying several other approaches.

0
source

I am using Anaconda Navigator, which includes Tensorflow. I use Spyder, a very useful Anaconda Navigator IDE similar to Matlab with a variable conductor.

You need to go to the page https://www.anaconda.com/download/#macos

and download and install it. It is open source. Then open Spyder and call the tensorflow lib file. This is the easiest mode to run shadoworflow and virtualenvs.

0
source

Source: https://habr.com/ru/post/1264231/


All Articles