How to install Numpy in Python 3.7 in Windows 10

What is Numpy? and how to install Numpy, Scipy, Matplotlib, iPython, Jupyter, Pandas, Sympy and Nose on Windows 10/8 or Windows 7 using Python PiP. Here in this article, we discuss it.

Quite simply, Numpy is a scientific computing library for Python that provides the functionality of matrix operations, which are generally used with Scipy and Matplotlib. In fact, the list already provides a matrix-like representation, but it provides us with more functions. If you have using Matlab, Scilab, then this tool is very good for you.

Numpy is one of the basic libraries that must be mastered for data analysis in Python. It can be used to store and process large matrices, and Numpy provides many advanced numerical programming tools such as matrix data types, vector processing, and precision. The computational library is designed for rigorous digital processing.

It is a powerful scientific computing package based on python. To install Numpy you must first install python. The installation of python is very simple, I installed python3.7. The installation steps for installing Numpy for Windows will be the same for Ubuntu and other Linux systems. The only difference will be the installation process of Python

Tools/supported things required

  • Installed python program

Step 1: Download Python for Windows 10/8/7

First, download the Python executable binaries on your Windows 10 system from the official download the page of the Python. Here is the link for that. It is available in different forms, go for executable one to easily install and setup Python on your system.

Python Releases for Windows

Step 2: Run the Python executable installer

Once the setup of Python gets downloaded, run it as administrator. Check the box given for “Add Python 3.7 to Path” and after that click on Install Now option.

Install Python 3.7 on Windows 10

Once done close the setup…

how to install numpy in python 3.7 windows 10

Step 3: Install pip on Windows 10/8/7

After successful installation of Python, open the command prompt and run the following command to install pip using python.

python get-pip.py --user

Install pip on Windows 10

Step 4: Install Numpy in Python using pip on Windows 10/8/7

So, finally, everything is ready and now its time to fire command for installing Numpy, Scipy, Matplotlib, iPython, Jupyter, Pandas, Sympy and Nose. We can either use a single command to install all of them or only one which we want to install particularly.

python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose

or

python -m pip install --user numpy
python -m pip install --user scipy
python -m pip install --user matplotlib
python -m pip install --user ipython
python -m pip install --user jupyter
python -m pip install --user pandas
python -m pip install --user sympy
python -m pip install --user nose

installing Numpy, Scipy, Matplotlib, iPython, Jupyter, Pandas, Sympy and Nose

Check Numpy Version

Here is the command to check the numpy version:

python
import numpy as nm
nm.version.version

The output of the above command in our case:

C:\Users\raj>python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:13:57) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as nm
>>> nm.version.version
'1.17.0'
>>>

check numpy version

In this way, you can also check the versions of scipy, matplotlib, ipython, jupyter, pandas, sympy and nose.

Example:

import numpy as np 

# Creating array object 
arr = np.array( [[ 1, 2, 3], 
[ 4, 2, 5]] ) 

# Printing type of arr object 
print("Array is of type: ", type(arr)) 

# Printing array dimensions (axes) 
print("No. of dimensions: ", arr.ndim) 

# Printing shape of array 
print("Shape of array: ", arr.shape) 

# Printing size (total number of elements) of array 
print("Size of array: ", arr.size) 

# Printing type of elements in array 
print("Array stores elements of type: ", arr.dtype)
print ("\nOriginal array:\n", arr)

Example of Numpy

Let create some graph using matplotlib and scipy

import scipy as sp
import matplotlib.pylab as mat

t = sp.linspace(0, 1, 100)

plt.plot(t, t**2)

plt.show()

create some graph using matplotlib and scipy

 

One Response

  1. ma September 2, 2019

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.