How To Install Python Pandas on Windows and Linux?

Pandas is a Python package that provides fast, flexible data structures to work with tabular, multidimensional, and time-series data in an easy and intuitive way. A lot of Python application developers, statisticians, and big data experts prefer pandas for their daily calculations. In this tutorial, we will examine how to install Pandas on Windows and Linux operating systems by using the pip package manager, apt package manager, dnf package manager, and Anaconda tool.

Install Python Pandas with pip Package Manager (Linux, Windows)

pip is a popular Python package manager that can be used to install, update and remove. As a python package pandas can be installed with the pip command. Before installation, the latest version number and package information about pandas can be displayed like below. This installation commands can be used for both Windows and Linux operating systems where pip already installed. For Windows pip is installed with the Python by default. For Linux distributions, the pip should be installed explicitly with package managers.

$ pip3 show pandas

And the pandas package can be installed for the Python3 with the following command.

$ pip3 install pandas

If you need to install pandas package for the Python2 use the following command.

$ pip2 install pandas

Install Python Pandas with apt Package Manager (Linux, Ubuntu, Debian, Mint)

Linux distributions like Ubuntu, Debian, Mint, etc provide the apt or apt-get package manager in order to install packages. Pandas also provided as a package by these distributions repositories and can be installed with the apt command. The apt package of the Python Pandas is provided with the name python3-pandas for Python3 and python2-pandas for Python2. First we will display some helpful information about the python3-pandas package.

$ apt show python3-pandas

Now we can install pandas for Python3 with the following apt command.

$ sudo apt install python3-pandas

or Python2 like below.

$ sudo apt install python2-pandas

Install Python Pandas with yum Package Manager (Linux, Fedora, CentOS, RHEL)

Fedora, CentOS, and RHEL Linux distributions use the yum command for package management and Python Pandas package can be installed with the following yum command for these distributions.

$ sudo dnf install python3-pandas

or with the yum command;

$ sudo yum install python3-pandas

Leave a Comment