How To Install NumPy In Python

Wajiha Urooj
Edureka
Published in
5 min readSep 23, 2019

NumPy is one library that 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,

  • What is NumPy?
  • How to install NumPy On Mac Operating System
  • Installing NumPy On Windows Operating System
  • NumPy Installation On Ubuntu Operating System
  • How to Install NumPy On Fedora Operating System

Let's begin!

What is NumPy?

Python is an open-source object-oriented interpreted language. Of the many features, one of the important features that make 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 a directory of python scripts. Each script is a module that can be a function, methods, or new python type created for a 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 a 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 the 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 both python 2.7 and the latest version of python 3.7.

PYTHON 2.7

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

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

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

Python 3

Similarly, you can install numpy in python 3 also. After opening the terminal as detailed in step 1 above, use the 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.

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 the Windows operating system. You can download the required version of python from python.org. Once python is installed successfully, open the command prompt, and use pip to install NumPy.

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.

Once pip is setup you can use the same commands

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

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.

If you wish to check out more articles on the market’s most trending technologies like Artificial Intelligence, DevOps, Ethical Hacking, then you can refer to Edureka’s official site.

Do look out for other articles in this series which will explain the various other aspects of Python and Data Science.

1. Machine Learning Classifier in Python

2. Python Scikit-Learn Cheat Sheet

3. Machine Learning Tools

4. Python Libraries For Data Science And Machine Learning

5. Chatbot In Python

6. Python Collections

7. Python Modules

8. Python developer Skills

9. OOPs Interview Questions and Answers

10. Resume For A Python Developer

11. Exploratory Data Analysis In Python

12. Snake Game With Python’s Turtle Module

13. Python Developer Salary

14. Principal Component Analysis

15. Python vs C++

16. Scrapy Tutorial

17. Python SciPy

18. Least Squares Regression Method

19. Jupyter Notebook Cheat Sheet

20. Python Basics

21. Python Pattern Programs

22. Web Scraping With Python

23. Python Decorator

24. Python Spyder IDE

25. Mobile Applications Using Kivy In Python

26. Top 10 Best Books To Learn & Practice Python

27. Robot Framework With Python

28. Snake Game in Python using PyGame

29. Django Interview Questions and Answers

30. Top 10 Python Applications

31. Hash Tables and Hashmaps in Python

32. Python 3.8

33. Support Vector Machine

34. Python Tutorial

Originally published at https://www.edureka.co on September 23, 2019.

--

--