9
  1. I have a Raspberry 3 Model B with the latest version of Raspbian (installed with Noobs 2.3.0).
  2. I have successfully installed Python 3.5.2 using the instructions found in this post: http://bohdan-danishevsky.blogspot.com.es/2015/10/building-python-35-on-raspberry-pi-2.html
  3. I am trying to install Pandas (particularly, version 0.18 or higher), on that version of Python (not 3.4).
  4. I have tried pip install, but can't make it point to python 3.5.2 even uninstalling version 3.4. I have also tried

    sudo apt-get install python3-pandas
    

    with no luck...

I am quite desperate. Is there no way to do this? I have searched for multiple solutions in this site and still nothing.

Does anyone know how to do it?
Thanks

Victor Sg
  • 153
  • 1
  • 1
  • 11
  • If you install Anaconda, then you'll have pandas, numpy, and all those other science packages. – OneCricketeer Mar 08 '17 at 22:19
  • When you ran `sudo apt-get install python3-pandas` what error did you have? – eyllanesc Mar 08 '17 at 22:20
  • 2
    Also, `apt search pandas` shows `python3-pandas/stable 0.14.1-2`, not `0.18` or higher... – OneCricketeer Mar 08 '17 at 22:20
  • Thank you everyone for your replies. – Victor Sg Mar 09 '17 at 10:15
  • Thank you everyone for your replies. I have not tried installing Anaconda, but I am afraid the problem will persist that the Python version I need it to work with will not be able to use it. How would I install it for Python 3.5 instead of Python 3.4? Does this question even make sense? (apologies if it doesn't) Same goes for eyllanesc, I get no error, I just can't use it with Python 3.5. I install it properly, but no matter what I do, it gets installed under Python 3.4 even having changed (or so I think) the default Python3 version in the Raspberry! – Victor Sg Mar 09 '17 at 10:22

1 Answers1

10

I'd been searching for the same thing: a way to "install" the current version of pandas on a Raspberry Pi 3. Using apt-get to install it on the RPi pulls an outdated version of pandas from the Raspbian repository.

On GitHub. I found two solutions for installing the current version of pandas (and Python/packages in general) on the RPi 3: one solution involves building and installing pandas directly on the Raspberry Pi, and the other solution involves installing a current Raspberry Pi version of conda (called BerryConda) on the Raspberry Pi and then downloading the current version of pandas as an RPi package from the Anaconda Cloud.

Solution 1:

User kleinee on GitHub has created a script that will create a Jupyter notebook server on Raspberry Pi 2 and/or 3. Although, the intent of the script is to create a Jupyter notebook server, it can be modified easily to install only the current version of pandas on the RPi.

The script starts by downloading the most recent version of Python 3 (currently, 3.6.1), setting it up and installing it on the RPi. The script then goes on to download other parts of what he calls a "scientific stack," which includes the current version of pandas. He also provides another script that will check for updates to installed Python packages and automatically update them, as necessary.

You can run the entire script as is (to install current versions of Python, jupyter, pandas, numpy, scipy, matplotlib, etc.) or you can edit the script to install only the current version of pandas. I ran the script "as is" yesterday and it took about 4 hours to install Python and the included "stack" (to include pandas) on my RPi 3.

The advantage to this solution is that you are downloading the current version of Python and packages directly from the source, so you will always get the most recent version. The disadvantage is that you have to "build" them locally on the RPi, which will take time (4 hours, in my case, for about a dozen packages, including Python itself).

Solution 2:

User jjhelmus has created "BerryConda," a current RPi version of conda. He has also created Python packages (including the current version of pandas) that he makes available on the RPi channel at Anaconda Cloud. Using this solution, you can install the current version of pandas using BerryConda without having to compile it, like you do in solution 1.

The advantage to this solution is that you do not have to compile anything locally, so setup is much faster. A possible disadvantage is that BerryConda and the associated packages are built and maintained by someone not associated with Anaconda or Continuum Analytics who may or may not continue to do so in the future. Although, the BerryConda packages are currently up-to-date, there's no guarantee that will be the case going forward.

s-huffman
  • 116
  • 1
  • 4
  • 1
    As of June 2019 I recommend option 1, however it still takes many hours to install. Option 2 is currently outdated – Karol Zlot Jun 29 '19 at 03:52