How to Install TensorFlow in Pycharm ? 5 Steps Only

Install TensorFlow in Pycharm featured image

TensorFlow is a popular library for machine learning modeling. It is an open-source package that allows you to do all deep learning works such as neural networks e.t.c.  It can also be referred to as Math and can do computational work on multiple CPUs and GPUs. I have found that many new programmers are unable to install TensorFlow properly. Therefore I have come up with this tutorial. In this entire tutorial, you will know how to install TensorFlow in Pycharm. Just execute the following steps to install it properly.

If you have not installed this package in your Pycharm then you will see a red underline below the statement import tensorflow as tf. It means Pycharm does not have recognized it and you have to install it.

import tensorflow error
Import tensorflow error

Steps by Steps to install TensorFlow in Pycharm

Step 1: Go to File. There you will see Setting click on it.

Step 2:  After Clicking on Setting, you will see Project:your_project_name. Click on it. Then you will see two options. One is Project Interpreter and the other Project Structure.

Pycharm Project Setting for Tensorflow installation
Pycharm Project Setting for Tensorflow installation

Step 3: Just Click on the Project Interpreter. There you will see all the packages installed.

You can clearly see TensorFlow is not installed.

Project Interpreter window for Tensorflow installation
Project Interpreter window for Tensorflow installation

Step 4: Click on the + Sign. You will see the search field. Go on it and search for TensorFlow. You will see the TensorFlow and its version and descriptions.

Tensorflow Available Package
Tensorflow Available Package

Step 5: Choose TensorFlow and click on the install package that you will see on the left bottom. It will successfully install the TensorFlow package.

Successfully installed tensorflow python package
Successfully installed tensorflow python package

If you are getting the error and are unable to install it. Then go to your terminal and type the following command.

pip install tensorflow

It will start downloading the TensorFlow package from the pip public directory and will install it.

Installation of Tensorflow using Terminal
Installation of Tensorflow using Terminal

Hurray!! You have successfully installed the TensorFlow package.

How to test if TensorFlow is installed or not?

After following all the above steps, you have easily installed the TensorFlow package. Now it’s time to check whether TensorFlow is installed or not. Just run the below code to check it.

import tensorflow as tf 
print(tf.__version__)

You will see the version of the TensorFlow as the output. It verifies that it is successfully installed in the Pycharm. Otherwise, you will get the ModuleNotFoundError: No module named ‘tensorflow’

Source:

TensorFlow Offical Documentation

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

Meet Sukesh ( Chief Editor ), a passionate and skilled Python programmer with a deep fascination for data science, NumPy, and Pandas. His journey in the world of coding began as a curious explorer and has evolved into a seasoned data enthusiast.
 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner