I'm trying to install Python Pandas on my Raspi and I'm finding strange errors.
~ $ pip install pandas
Downloading/unpacking pandas
Downloading pandas-0.13.1.tar.gz (6.1Mb): 6.1Mb downloaded
Running setup.py egg_info for package pandas
warning: no files found matching 'README.rst'
no previously-included directories found matching 'doc/build'
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.png' found anywhere in distribution
....
pandas/src/klib/khash_python.h:13:1: warning: statement with no effect [-Wunused-value]
pandas/src/klib/khash_python.h: In function âkh_del_pymapâ:
pandas/src/klib/khash_python.h:38:1: warning: statement with no effect [-Wunused-value]
pandas/src/klib/khash_python.h: In function âkh_del_pysetâ:
pandas/src/klib/khash_python.h:44:1: warning: statement with no effect [-Wunused-value]
pandas/src/klib/khash_python.h: In function âkh_del_strboxâ:
pandas/src/klib/khash_python.h:49:1: warning: statement with no effect [-Wunused-value]
and then more (削除) errors (削除ここまで) warnings for a long time. It never actually fails, but doesn't complete either in over half an hour. What is going on here and how do I fix it?
Edited to add
I have tried the alternative route of sudo apt-get install python-pandas
which does install pandas
but it's only version 0.8 rather than 0.13. Trying to follow up with sudo pip install pandas --upgrade
gives the same results as above.
-
what errors?? lines starting with word 'warning' are warnings, ignore them.lenik– lenik2014年05月23日 15:44:48 +00:00Commented May 23, 2014 at 15:44
-
It's more the fact that the installation doesn't finish that worried me. This was just the start of a long dump of warnings. Edited to clarify.Jamie Bull– Jamie Bull2014年05月23日 15:57:24 +00:00Commented May 23, 2014 at 15:57
-
Are you sure it's broken? Pandas relies on numpy which can take an extremely long time to build, even on a very fast desktop machine. Did this ever complete? I'm considering using pandas for a project on my Pi so I'm curious if you had luck with this or gave up.John Ewart– John Ewart2014年07月17日 21:08:28 +00:00Commented Jul 17, 2014 at 21:08
-
Yes, it did work. It took a long time to build but got there in the end and has been working fine ever since.Jamie Bull– Jamie Bull2014年07月22日 11:21:41 +00:00Commented Jul 22, 2014 at 11:21
-
Facing the exact same problem myself now, how long did it take in the end @JamieBull ?Ben– Ben2015年07月19日 21:55:57 +00:00Commented Jul 19, 2015 at 21:55
5 Answers 5
Going back to basics, I looked at the installation page for pandas
and found that pip install pandas
isn't the recommended route on linux
systems.
sudo apt-get install python-pandas
did the trick.
-
2This works but installs pandas 0.14.1 (old) when using Raspbian Jessie. Here is an answer that gives two other options. stackoverflow.com/questions/42682928/…wroscoe– wroscoe2017年10月22日 05:10:36 +00:00Commented Oct 22, 2017 at 5:10
-
11This installs on the default Python 2, for Python 3 use
sudo apt-get install python3-pandas
Rami Alloush– Rami Alloush2019年07月15日 23:32:10 +00:00Commented Jul 15, 2019 at 23:32 -
Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.Ingo– Ingo2020年02月04日 10:47:18 +00:00Commented Feb 4, 2020 at 10:47
-
1I just tried this on my Pi4B and it seems to have installed v 0.23.3Bamboo– Bamboo2020年08月05日 02:59:31 +00:00Commented Aug 5, 2020 at 2:59
sudo apt-get install python3-pandas
works on the Raspberry Pi4 and the pandas version is 0.23.3
.
-
That is the only way I could install on a Pi3B+SteveC– SteveC2020年04月20日 22:27:54 +00:00Commented Apr 20, 2020 at 22:27
The above answer works but I then faced issues getting pandas into the virtualenv that I had created. Copying this answer
https://stackoverflow.com/questions/29466663/memory-error-while-using-pip-install-matplotlib
from a related matplotlib issue fixed my situation on the latest raspbian install.
Solution: pip --no-cache-dir install pandas
Personally I create a virtual environment and install pandas
through pip
(the relevant dependencies such as numpy
will be installed along the way)
sudo pip3 install pandas
worked for mine
-
1
pip3
is for Python3 whereas the OP was usingpip
, which means he's using Python 2. Therefore, he should trysudo pip install pandas
instead of usingpip3
, because Python 2 won't be able to find modules installed usingpip3
.user96931– user969312020年04月11日 02:07:09 +00:00Commented Apr 11, 2020 at 2:07 -
1@user96931 not necessarily so. This is a pretty old question but on a current system
python
might (and imho should) link to Python 3 andpip
links topip3
.2020年04月11日 18:35:45 +00:00Commented Apr 11, 2020 at 18:35 -
It's better to be explicit than risk error through ambiguity.user96931– user969312020年04月12日 23:01:30 +00:00Commented Apr 12, 2020 at 23:01