Numpy is a very popular library for easily creating single, multidimensional array and matrices. It has a large collection of the mathematical function for performing an operation on these arrays. Most of the new Programmers are unable to install numpy properly. In this tutorial of How to, you will know how to install numpy in Pycharm. Just follow the simple steps to install it on Pycharm.
When you write import numpy as np , then you will see the text without any highlighting or you will see red undeline on the word numpy just like below. It means Pycharm has not recognized it.
Step1: Go to the File and click on Settings.
Step 2: You will see > Project: your_project_name.Click on it. You will see two option one is Project Interpreter and other Project Structure.
Step 3: Click on the Project Interpreter. You will see all the packages installed.
Step 4: You will see the + button. Click on it and search for the numpy in the search field. You will see the numpy package as the left side and its description, version on the right side.
Step 5: Selecting numpy click on the Install Package on the left bottom. It will install the packages. If you are unable to install and got an error. Then go to terminal first upgrade pip using the command
python -m pip install --upgrade pip
Then use the following command to install the numpy.
pip install numpy
Congrats you have successful install the numpy in Pycharm.
How to test if numpy is installed or not?
After the installation of the numpy on the system you can easily check whether numpy is installed or not. To do so, just use the following command to check. Inside the Pycharm write the following code and run the program for getting the output.
import numpy as np
print (np.__version__)
When you will run it you see the following output that is numpy version.
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.