Sunday, October 31, 2021

[SOLVED] Error installing pandas on Raspberry Pi 4 in conda environment

Issue

I am trying to install pandas in to my conda environment using conda install pandas but the install fails because pandas has a dependency of pytz and pytz requires a minimum conda version of 4.3.

If I were running this on a normal Linux box I would just update my conda using 'conda update conda' and all would be sorted... However... the latest supported version of conda on a Rasperry Pi is 4.2.13 (using the rpi conda channel conda config --add channels rpi).

Help! Is it really not possible to use pandas in a conda environment on a Raspberry Pi 4B?!

To replicate the problem:

Raspberry Pi 4B, 8GB RAM with 64GB SD card)
OS: Raspbian Buster (10) (lsb_release -irdc)
IDE: Spyder 4
Python: 3.4.3 (python --version)
Virtual environment: Conda (Miniconda distribution)
Conda version: 4.2.13 (linux-armv7l) (conda info)

Current conda environment (conda list):

conda         4.2.13
conda-env     2.6.0
ncurses       6.1
openssl       1.0.1k
pip           20.1.1
psycosat      0.6.1
pycrpto       2.6.1
python        3.4.3
pyyaml        3.11
readline      7.0
requests      2.7.0
ruamel_yaml   0.11.14
setuptools    18.1
SQLite        3.24.0
wheel         0.34.2
xz            5.0.5
yaml          0.1.7
zlib          1.1.11

Related questions:
Out-dated answer to similar question (Berry Conda / RPI channel is no longer supported): Raspberry Pi-Python: Install Pandas on Python 3.5.2

Install old version of pandas and not in to a virtual env: https://raspberrypi.stackexchange.com/questions/17073/how-do-i-install-pandas-on-raspberry-pi


Solution

I ran in the exact same problem. The solution was to dump miniconda (python=3.4) and use virtualenv and pip (which uses the system version python 3.7). Then all goes well.



Answered By - Simon