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, Show
Lets begin! 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 SystemNow 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.7Open a terminal in your MacBook and type python to get into python prompt. 2. In the terminal, use the pip command to install numpy package. 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. Python 3Similarly, 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. 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 SystemPython 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. Moving on with this Install NumPy in Python article NumPy Installation On Ubuntu Operating SystemPython 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. 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 SystemSimilar 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. 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. Does Python come with NumPy?Installation and Getting Started
NumPy does not come with Python by default so it needs to be installed. As I recommended for the Pandas installation, the easiest way to get NumPy (along with a ton of other packages) is to install Anaconda.
Is NumPy installed by default Python?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.
How do I know if NumPy is installed in Python?Go to Python -> site-packages folder. There you should be able to find numpy and the numpy distribution info folder. If any of the above is true then you installed numpy successfully.
|