How to install pandas for Python 3?

Roman picture Roman · Aug 4, 2016 · Viewed 79.5k times · Source

I try to install pandas for Python 3 by executing the following command:

sudo pip3 install pandas

As a result I get this:

Downloading/unpacking pandas
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pandas
Cleaning up...
No distributions at all found for pandas

Maybe it is interesting to note that installation for Python 2 works fine.

sudo pip install pandas

Returns the following:

Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/lib/python2.7/dist-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/lib/python2.7/dist-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in /usr/lib/python2.7/dist-packages (from pandas)
Cleaning up...

ADDED

I have just installed pandas in the following way:

sudo apt-get install python3-pandas

Answer

Ananda picture Ananda · Apr 24, 2017

Try this:

sudo apt-get install python3-pip
sudo -H pip3 install pandas