NumPy Installation – How to Install Numpy in Python

Free NumPy course with real-time projects Start Now!!

Python is an open-source object-oriented language. It has many features of which one is the wide range of external packages. There are a lot of packages for installation and use for expanding functionalities. These packages are a repository of functions in python script.

NumPy is one such package to ease array computations. To install all these python packages we use the pip- package installer. Pip is automatically installed along with Python. We can then use pip in the command line to install packages from PyPI.

Install Numpy in Mac OS

Python comes pre-installed on Mac OS. However, it has an old system version the newer versions can be downloaded alongside.

1. Open the terminal in your MacBook.

2. In the terminal, we use the pip command to install the package

pip install numpy

3. If you use Python3, enter the pip3 command.

pip3 install numpy

4. After the package is installed, we type the Python command to get into the Python prompt.

Python-9

5. We then use the import command to use the installed package.

import numpy as ny

 

numpy installation in mac

 

Numpy Installation in Windows OS

Python is not pre-downloaded in windows. User can download the latest version from python.org. Anaconda is also a great choice to begin with as it has a lot of pre-installed packages.
After python installation is successful,

1. Open command prompt

2. Use the pip command

pip install numpy

3. Use the import command

import numpy as np

install numpy in windows

Install Numpy in Ubuntu OS

Python is pre-installed in Ubuntu. The problem in installing packages is that pip is not installed along with. There are two ways for pip installation:

1. Download python package. Then we can use the apt install command to install pip.

apt install python-pip python-pip3

2. We can also install pip on Ubuntu and then further install numpy.

3. We can then use the install command for NumPy.

pip install numpy

 

install numpy

numpy installation in ubuntu

Summary

In this article, we have learnt how to install numpy. The NumPy Package installation differs in different operating systems, because of the pre-installation system features. The installation of the NumPy package comes with a vast range of modules for performing operations on arrays.

These modules have python scripts containing methods and functions. These methods and functions help overcome the lacking functionalities in Python. It also helps cut the execution time.

We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *