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 a Math Library and can do computational works on multiple CPUs and GPUs. I have found that many new programmers are unable to install TensorFlow properly. Therefore I have come 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 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 the tensorflow. You will see the tensorflow and its version and descriptions.
Step 5: Choose the tensorflow and click on the install package that you will see one the left bottom. It will successfully install the TensorFlow package.
If you are getting the error and unable to install. 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 its 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.
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.