Anaconda : ModuleNotFoundError: No module named 'tensorflow'

After installing TensorFlow in Anaconda, I tried to test it :

import tensorflow as tf

In Jupyter, I get this error :

ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_13080/3793406994.py in <module>
----> 1 import tensorflow as tf

ModuleNotFoundError: No module named 'tensorflow'

enter image description here

How I can fix this issue?

Upvotes: 1

Views: 1181

Answers (2)

Yeyu TANG
Yeyu TANG

Reputation: 9

You can reinstall tensorflow.

pip install tensorflow 

or

conda install tensorflow

Upvotes: 0

eshirvana
eshirvana

Reputation: 24568

Open your terminal, then switch to your env directory and run:

conda activate virtual_env_name

now try again

Upvotes: 1

Related Questions