Different Ways of Installing Python's Numpy on Linux
Last Updated :
08 Oct, 2021
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
Method 1: Using PIP to install NumPy on Linux
Follow the below steps to install Numpy on Linux:

- 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'

Method 2: Using Anaconda-Navigator to Install Numpy on Linux
Follow the below steps to install Numpy using anaconda-Navigator:
- Open a new terminal window and enter the command given below
$ anaconda-navigator

Anaconda Navigator- After the Anaconda-Navigator is finished loading click on the Environments tab
- Now we will create a virtual environment to install Numpy but if you don't want to do that you can just install Numpy in your base(root) environment by skipping the steps of creating a virtual environment
- Click on the "Create" button at the bottom of the navigator

- Now choose a name for your virtual environment and a Python version then click on "Create"

- Select your virtual environment and search for "Numpy" in the search bar


- Again click on apply and wait for the completion of the installation process
- Now we will check if the installation was successful or not
- Click on the PLay button next to the name of your virtual environment and choose "Open Terminal"

- In the terminal type the following command:
$ pip show numpy
If your output is similar to this your installation was successfulMethod 3: Using conda to Install Numpy on Linux
Follow the below steps to install Numpy on Linux using conda:
- Open a new terminal window and enter the command given below
$ conda activate base

- Now type the following command to install Numpy
$ conda install numpy


- Press the enter key to continue the installation
- After the installation is completed you can verify the installation using the following command
$ pip show numpy
You can install other libraries through Anaconda using the same process.
Congratulations, at this point you have completed the installation process successfully.
Similar Reads
How to Install Numdifftools in Python on Linux? Numdifftools is a Python-based toolkit that solves numerical differentiation issues in one or more variables automatically. To produce the most accurate outcome, finite differences are exploited adaptively in conjunction with a Richardson extrapolation mechanism. This library is cross-platformed, so
2 min read
How to Install Numpy on Linux? Python NumPy is a general-purpose array processing package that provides tools for handling n-dimensional arrays. It provides various computing tools such as comprehensive mathematical functions, linear algebra routines. NumPy provides both the flexibility of Python and the speed of well-optimized c
2 min read
How to Install Scipy In Python on Linux? In this article, we are going to see how to install Scipy in Python on Linux, SciPy is a python library that is useful in solving many mathematical equations and algorithms, it is a free and open-source Python library built on top of the popular NumPy library. To install Scipy on Linux: There are ge
2 min read
How to Install python-nmap Library on Linux? Python-Nmap is a network mapper that is exceptionally vital in handling security auditing and discovering the network. It exists as an open-source project; thus it is available for free. All the core operating systems support Python-Nmap. However, the binary packages are only available for Windows,
5 min read
How to Install SQLAlchemy in Python on Linux? SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that is used as flexible database access using SQL. In this article, we will look into the process of installing SQLAlchemy on a windows machine. Pre-requisites: The only thing that you need for installing Numpy on Windows are: Python
2 min read
How to Install Python sympy on Linux? Sympy is a Python library that is used to perform symbolic mathematics operations. It is a full-featured algebra system that keeps the code as simple as possible for more simplicity and efficiency. Sympy library depends on some other Python libraries like mpmath which is a core python library to per
2 min read
How to Install Python on Linux This guide explains how to install Python on Linux machines. Python has become an essential programming language for developers, data scientists, and system administrators. It's used for various applications, including web development, data science, automation, and machine learning.This comprehensiv
15+ min read
How to Install OpenCV for Python in Linux? Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify ob
2 min read
How to Install NuPIC on Linux? NuPIC (short for "Numenta Platform for Intelligent Computing") is an open-source platform for machine learning and artificial intelligence. It was developed by Numenta, a company founded by Jeff Hawkins, the creator of the PalmPilot and the co-founder of Handspring. NuPIC is based on the theory of t
4 min read
How to Install Chainer Python Library on Linux? Deep learning is a subset of machine learning that uses artificial neural networks to mimic the human brain. Chainer is an open-source deep learning framework written entirely in Python, based on the NumPy and CuPy Python libraries. Chainer is a powerful, flexible, and intuitive deep learning framew
2 min read