0

I am trying to install tensorflow on mac and it's giving me this error.

ImportError: No module named tensorflow

Here is what I have done 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 check my installation. It doesn't work. I have spent 3 hours on the problem.

paralaxbison
  • 189
  • 1
  • 2
  • 13
  • Is `pip3` connected to the same Python version you want to use? (Some systems provide e.g. both python3.4 and python3.5, and `pip3` might not be the same version as `python3`.) If you download the wheel file and install from there, what happens? What messages does `pip3` give? – Draconis Nov 07 '16 at 18:43
  • How do you download the wheel file and install it? I am new to python and terminal installation. – paralaxbison Nov 07 '16 at 23:17
  • Could you cross-post to our [github](https://github.com/tensorflow/tensorflow/issues) page? This is where we reply to installation issues. – drpng Nov 08 '16 at 02:33
  • Done. Looking forward to getting this going. I have no idea what I am doing wrong. https://github.com/tensorflow/tensorflow/issues/5478 – paralaxbison Nov 08 '16 at 15:42
  • I had an issue installing tensorflow on python 3.7. Downgrading to 3.6 solve the issue – Kurtis Streutker Nov 01 '18 at 15:41
  • Please follow [this](https://www.tensorflow.org/install/pip#macos) link to install tensorflow in your system. Let us know if the issue still persists. –  Oct 07 '22 at 19:08

2 Answers2

0

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, after trying several other approaches.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
0

I use Anaconda Navigator which includes Tensorflow. I use Spyder, it's a IDE of Anaconda Navigator similar to Matlab with variable explorer, very useful.

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

and download and install it. It's open source. Then open Spyder and call tensorflow lib. It's the easiest mode to run tensorflow and virtualenvs.

pfRodenas
  • 326
  • 1
  • 2
  • 12