Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip3 install pandas hangs

I'm trying to install pandas on the raspberry pi 2 (model b, 7 wheezy), python3.5.1, pip 9.0.1 with the command from the title, this is my terminal.

pi@raspberrypi ~ $ sudo pip3 install pandas
Collecting pandas
  Using cached pandas-0.21.0.tar.gz
Requirement already satisfied: python-dateutil>=2 in /usr/local/lib/python3.5/site-packages (from pandas)
Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.5/site-packages (from pandas)
Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.5/site-packages (from pandas)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.5/site-packages (from python-dateutil>=2->pandas)
Installing collected packages: pandas
  Running setup.py install for pandas ... /

I have left it like this for hours, with no progress, what is wrong?

Without success, I have tried:

  • Pip Install hangs

  • https://bbs.archlinux.org/viewtopic.php?id=174186

Edit in response to Andy K's comment, I have tried the following with apt-get:

pi@raspberrypi ~ $ sudo apt-get install python3-pandas
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-pandas

I've added the correct repositories, but still no joy

like image 679
Preston Avatar asked Dec 04 '17 23:12

Preston


People also ask

How long does pandas take to install?

There are several ways of going about installing Pandas on a computer. The methods listed in this post are fairly simple, and it shouldn't take you longer than five minutes to get Pandas set up on your machine.

Does Python 3.8 support pandas?

Python version supportOfficially Python 3.8, 3.9 and 3.10.

How long does it take to build the wheel for pandas?

Building wheel for pandas on Ubuntu 20.04 takes more than 20 minutes, but not on 18.04.


2 Answers

I solved this by upgrading the os on the pi, then using the command:

sudo apt-get install python3-pandas

My repositories are now slightly different to in the repositories link in the question, they are below:

deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi

If anyone's interested, the specs are now as below:

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Finally, with the new os I still could not pip install pandas, i left it running overnight with no success

like image 169
Preston Avatar answered Nov 15 '22 21:11

Preston


I've had this same issue on ARM machines using Docker. On my machine python3-pip provided an old pip distribution (9.0.1). So for me upgrading pip & setuptools sufficed

pip3 install -U pip setuptools

Then you can install the rest of your dependencies normally.

like image 36
Greg Avatar answered Nov 15 '22 20:11

Greg