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.
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.
Step 3: Just Click on the Project Interpreter. There you will see all the packages installed.
You can clearly see TensorFlow is not installed.
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.
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.
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.
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’
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.