0

i have just install python, anaconda, tensorflow and i was trying to do first test of tesorflow in jupyter notebook but i doesn't work plz help me Thank you

python version == 3.7.0

using macbook 2015

import tensorflow as tf

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>
----> 1 import tensorflow as tf

ModuleNotFoundError: No module named 'tensorflow'

i have already checked in terminal (pip3 list) It already has tensorflow ,bu i have no idea why it doesn't work

Axiumin_
  • 2,107
  • 2
  • 15
  • 24
jy kim
  • 17
  • 5
  • 3
    Possible duplicate of [ImportError: No module named tensorflow](https://stackoverflow.com/questions/42244198/importerror-no-module-named-tensorflow) – Sudheej Aug 13 '19 at 01:12

1 Answers1

1

There could be so many different reasons the import is not working, you need to give us more information.

  • what environment did you install tensorflow in (if at all)?
  • did you check to see if the environment had tensorflow installed through conda list?
  • why did you choose to pip3 install instead of conda install?
  • did you activate the environment when you started the notebook?
  • did you try uninstalling tensorflow and reinstalling it?

I suspect that when you installed using pip3 it installed to the default location and not to the conda environment, in general, if you are using anaconda to manage your packages and environments always use conda install where possible. And when listing packages, use conda list not pip list.

Jay Mody
  • 3,727
  • 1
  • 11
  • 27