Install Numpy in Pycharm and Linux

How to Install Numpy in Pycharm ? 5 Steps Only

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.

simple import numpy text

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.

project Interpreter pycharm

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.

search numpy

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

numpy install error

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.

check numpy version

How to Install Numpy on Linux Operating System?

The above steps are for installing NumPy in Pycharm and in Windows. In this section you will know how to install NumPy on Linux Operating System. Just follow the steps to install it.

Step 1: Install the Python Pip Module.

Make sure you have already installed the Python Module. Go to the terminal and type the following commands on it.

sudo apt update
sudo apt install python-pip python3-pip  # python-pip for 2.xx version and python3-pip for 3.xx version 

installing pip3 and pip module

Step 2:  Install the NumPy

If you are able to successfully installed the pip in your system then run the following command to install the NumPy.

For Python 2.xx version

pip install numpy

For Python 3.xx version

pip3 install numpy

installing numpy for the python 3

In this case I am installing for the python 3.xx version. Following these steps, You have successfully installed the Numpy Library on Linux.

Other Questions

How to Uninstall Numpy from Pycharm?

Some readers have asked us If I have installed NumPy and want to uninstall it from Pycharm in future How to do it? In this section, you will know how to uninstall Numpy from Pycharm through steps by steps.

Step 1: Go to File>>Setting and click on your Project: Your Project Name.

Unistalling Numpy from Pycharm part 1
Uninstalling Numpy from Pycharm part 1

Step 2: Click on Project Interpreter. There you will see all the packages installed in it.

Uninstalling Numpy from Pycharm part 2
Uninstalling Numpy from Pycharm part 2

Step 3: Select the Numpy package and click on the “-“ icon. It will successfully remove the Numpy package from your Pycharm.

Uninstalling Numpy from Pycharm part 2
Uninstalling Numpy from Pycharm part 3

You will see the message in the green background color saying “Package Numpy successfully uninstalled“. Press Ok to Continue.

Uninstalling Numpy from Pycharm part 4
Uninstalling Numpy from Pycharm part 4

 

 

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.

 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner