Python Programming (136 Blogs) Become a Certified Professional
AWS Global Infrastructure

Data Science

Topics Covered
  • Business Analytics with R (26 Blogs)
  • Data Science (20 Blogs)
  • Mastering Python (83 Blogs)
  • Decision Tree Modeling Using R (1 Blogs)
SEE MORE

How To Install NumPy In Python?

Last updated on Feb 29,2024 318.7K Views

2 / 17 Blog from Python Libraries

NumPy is one library which is very integral to Python Programming. In this article we will learn how to install NumPy in Python. Following pointers will be covered in this article,

Lets begin!

🐍 Ready to Unleash the Power of Python? Sign Up for Edureka’s Comprehensive Online Certificate Course For Python with access to hundreds of Python learning Modules and 24/7 technical support.

What is NumPy?

Python is open source object oriented interpreted language. Of the many features, one of the important features that makes python a strong programming language is Python packages. A lot of external packages are written in python which you can be installed and used depending upon your requirement.

Python packages are nothing but directory of python scripts. Each script is a module which can be a function, methods or new python type created for particular functionality. numpy is one such important package created to ease array computation in python.

In this blog we will explain the process of downloading and installing numpy packages and how to use them in python environment on mac, windows, ubuntu and fedora operating systems. The basics of python programming language are not covered in this blog. For beginners, the basics of python programming language are covered in this Edureka blog.

All python packages are installed using pip – Package Installer for Python. You can view the details of all python packages and download them from Python Package Index (PyPI). However, pip is automatically installed when you download and install python from python.org or any other python integrated environment. Please read the blog for the best python integrated platforms which also provides loads of other functionalities. pip is the simplest way to download packages directly from PyPI from your command line.

Moving on with this Install NumPy in Python article

NumPy Installation On Mac Operating System

Now let’s see how we can install numpy on a mac operating system. This section details on both python 2.7 and latest version of python 3.7.

PYTHON 2.7

Open a terminal in your MacBook and type python to get into python prompt.
1. Press command (⌘) + Space Bar to open Spotlight search. Type in Terminal and press enter.

Output- Numpy installation - Edureka

Output- Numpy installation - Edureka

 

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

Output- Numpy installation - Edureka

3. Once the package is installed successfully, type python to get into python prompt. Notice the python version is displayed too. Use the import command to include numpy package and use it. You can also set an alias name (shortcut) for package.

Output- Numpy installation - Edureka

Python 3

Similarly, you can install numpy in python 3 also. After opening the terminal as detailed in step 1 above, use pip3 command to install numpy. Please notice we are using pip3 command instead of pip. pip3 command is used to let our system know that we are working with python3.

Output- Numpy installation - Edureka

Moving on with this Install NumPy in Python article we will see how to install NumPy on Windows Operating System

NumPy Installation On Windows Operating System

Python is not installed by default in windows operating system. You can download the required version of python from python.org. Once python is installed successfully, open command prompt and use pip to install numpy.

Output- Numpy installation - Edureka

Moving on with this Install NumPy in Python article

NumPy Installation On Ubuntu Operating System

Python is installed by default on ubuntu systems. However, pip is not installed. If you want the complete package, download python from python.org and install it on your ubuntu operating system using apt install command.
Alternatively, you can install pip on ubuntu and then install numpy which is the easier of the two ways.
You will need root privileges on the system to install pip and numpy. Open a terminal in ubuntu and install pip and pip3 using apt.

Output- Numpy installation - Edureka

Once pip is setup you can use the same commands

Output- Numpy installation - Edureka

Output- Numpy installation - Edureka

Moving on with this Install NumPy in Python article

How to Install NumPy On Fedora Operating System

Similar to Ubuntu operating system python is installed by default in fedora. Use pip command to install

Output- Numpy installation - Edureka (6)

Notice the difference in pip command for python3 specifically in fedora operating systems. Secondly, be aware that installing numpy with pip, installed it for both Python2 and Python3 automatically. This brings us to the end of this article.

 

Top 10 Trending Technologies to Learn in 2024 | Edureka

This video talks about the Top 10 Trending Technologies in 2024 that you must learn.

 

To get in-depth knowledge on Python along with its various applications, you can enroll here for live online training with 24/7 support and lifetime access.

Got a question for us? Mention them in the comments section of  article and we will get back to you.

Upcoming Batches For Python Programming Certification Course
Course NameDateDetails
Python Programming Certification Course

Class Starts on 23rd March,2024

23rd March

SAT&SUN (Weekend Batch)
View Details
Python Programming Certification Course

Class Starts on 20th April,2024

20th April

SAT&SUN (Weekend Batch)
View Details
Comments
1 Comment
  • Ali Zaid says:

    Thanks man! Much appreciated.

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

How To Install NumPy In Python?

edureka.co