All Courses

ModuleNotFoundError: no module named 'tensorflow'

By, 3 months ago
  • Bookmark

How to fix this error ModuleNotFoundError: no module named 'tensorflow'

2 Answers

Go to terminal and write : pip install tensorflow


This error occurs when the TensorFlow library is not installed in your system. To fix this, you can install TensorFlow by running the following command in your command prompt or terminal:

pip install tensorflow

If you are using a specific version of TensorFlow, you can install it by specifying the version number. For example, the following command installs TensorFlow version 2.4.0:

pip install tensorflow==2.4.0

It's also important to note that if you are using anaconda, you may need to use the command 'conda' instead of 'pip'.

conda install tensorflow

Also, in case you are working on virtual environment, make sure you are in the correct environment before running the above commands.

Your Answer


Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Mar 30th (7:00 PM) 516 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More