0

While installing tensorflow(CPU only) I am facing below error :

>>> import tensorflow as tf

Traceback (most recent call last): File "", line 1, in ImportError: No module named 'tensorflow'

I have python version 3.5

James Z
  • 12,209
  • 10
  • 24
  • 44
Anjali
  • 23
  • 1
  • 2
  • 5

5 Answers5

0

Did you first try:

pip3 install --upgrade tensorflow
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Autumn
  • 41
  • 7
0

It's maybe due to some missing .py files. Download the package from Github link and paste it on python35/Lib/site-packages

Dharun
  • 1
  • 1
0

import tensorflow as tf

invokes tensorflow not install it there is great article how to install on tensorflow website.

You have not mentioned platform/OS you working on also steps taken if any before trying this command.

best thing for beginners I feel is Anaconda which is suit of packages required for data science.

Give it a try.

Devidas
  • 2,479
  • 9
  • 24
0
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

You can search for the appropriate version you wish to install and update in the above mentioned url.

Prakhar Agarwal
  • 2,724
  • 28
  • 31
0

Try to install an old version of Tensorflow as:

pip install tensorflow==1.5.0   

After installing the old version retry with the newest version, for example:

pip install tensorflow==1.9.0 
Juba Fourali
  • 740
  • 9
  • 10