import the numpy package in python code example Example 1: import numpy python import numpy as np Example 2: install numpy sudo pip3 install numpy