Objective

The objective is to install Numpy on Ubuntu 18.04 Bionic Beaver Linux.

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic Beaver Linux
  • Software: - Python 2 & Python 3

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Python 2

Install Numpy Module from Ubuntu repository

The recommended approach is to install the stable Numpy module directly from the Ubuntu repository:
$ sudo apt install python-numpy
Check for the Numpy module version:
$ python -c "import numpy; print(numpy.__version__)"
1.13.3
install numpy python 2 - ubuntu 18.04 Bionic beaver
Numpy Python module on Ubuntu 18.04

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


Install Numpy Module using PIP

Once you have an appropriate PIP python version installed, you can also install Numpy by executing the bellow command:
$ pip install numpy
Check for the Numpy version number:
$ python -c "import numpy; print(numpy.__version__)"
1.14.2

Python 3

Install Numpy Module from Ubuntu repository

You can install the Numpy module for Python 3 from the standard Ubuntu repository by executing the following linux command:
$ sudo apt install python3-pip
Check for the Numpy's version:
$ python3 -c "import numpy; print(numpy.__version__)"
1.13.3
install numpy python 3 - ubuntu 18.04 Bionic beaver
Numpy Python 3 module on Ubuntu 18.04

Install Numpy Module using PIP

Using the appropriate PIP python version installed on your system execute the following pip3 command to install the python Numpy module:
$ pip3 install numpy
All done. Check for the Numpy's version:
$ python3 -c "import numpy; print(numpy.__version__)"
1.14.2
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.