How to use PIP to install NumPy on Linux In Python
Follow the below steps to install Numpy on Linux:
- Open a new terminal
- Enter the following command in your terminal
$ pip install numpy
- After the installation is complete, you can test if it was correctly installed using the following commands.
$ pip show numpy
- There is an alternate way of checking
$ python >>> import numpy as np >>> np.__version__
Example Output:-
'1.17.4'
Different Ways of Installing Python’s Numpy on Linux
Numpy is a python library that is very popular in the field of data science because it makes the task of data processing very efficient, unlike conventional arrays. If you want to learn more about Numpy, please refer to this article.
Before we start with the installation steps, we have to make sure that your system has python installed.
Type the following command in the terminal (To open the terminal, press Ctrl + Alt + T)
$ python --version
If the output of the command is a valid python version, then you have python installed in your system.
Example Output:
Python 3.8.10
But if you don’t have Python installed in your system, there’s nothing to worry about. You can install Python using the following commands.
$ sudo apt-get update $ sudo apt-get install python3
Now that you have successfully installed python in your system, we can start installing Numpy