Skip to content

Instantly share code, notes, and snippets.

@simoncos
Last active August 9, 2023 07:18
Show Gist options
  • Star 54 You must be signed in to star a gist
  • Fork 20 You must be signed in to fork a gist
  • Save simoncos/a7ce35babeaf73f512be24135c0fbafb to your computer and use it in GitHub Desktop.
Save simoncos/a7ce35babeaf73f512be24135c0fbafb to your computer and use it in GitHub Desktop.
Install Miniconda 3 on Raspberry Pi

refer to: https://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b

{USER}: pi

Install Miniconda 3:

wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
sudo md5sum Miniconda3-latest-Linux-armv7l.sh # (optional) check md5
sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh # -> change default directory to /home/pi/miniconda3
sudo nano /home/pi/.bashrc # -> add: export PATH="/home/pi/miniconda3/bin:$PATH"
sudo reboot -h now

Test:

conda
python --version

If Conda update miss permission of the directory:

sudo chown -R pi miniconda3
@dylanw-oss
Copy link

@loganyc1934 I had the same experience with an older installation of conda, tried updating and had the same experience again. I think the problem is basically that conda packages need to be built specifically for the ARM architecture that RPi uses, and there just aren't many people building them on this architecture. A year or two ago, the situation was better. But nowadays, most of those old builds have disappeared, which means that conda just isn't a good solution for RPi beyond the basic installation of python and pip. In fact, even the most recent installer only installs python 3.4, which is almost 4.5 years old (ancient in conda), and older than the default python3 installed with raspbian.

But the upside is that pip has really improved drastically in recent years. Since I think most of us are using some *nix OS on the RPi, we probably have compilers, and pip is pretty good at compiling things for you automatically. If you need the nice environment management that conda brought, you can now use pipenv. So that's probably the better solution now.

You're right! Miniconda only supports to create env with python 3.4 on Raspi now , I hope I had read your reply before trying it. I have to uninstall Miniconda.

@Maximilian-Pichler
Copy link

Maximilian-Pichler commented Jul 21, 2021

@vinayak19th:

curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh > anaconda.sh \
&& bash anaconda.sh -b -p /opt/anaconda \
&& /opt/anaconda/bin/conda update -y --all \
&& export PATH="${PATH}:/opt/anaconda/bin" \
&& echo ". /opt/anaconda/etc/profile.d/conda.sh" >> ~/.bashrc \
&& . ~/.bashrc

@vinayak19th
Copy link

@vinayak19th:

curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh > anaconda.sh \
&& bash anaconda.sh -b -p /opt/anaconda \
&& /opt/anaconda/bin/conda update -y --all \
&& export PATH="${PATH}:/opt/anaconda/bin" \
&& echo ". /opt/anaconda/etc/profile.d/conda.sh" >> ~/.bashrc \
&& . ~/.bashrc

Thanks. I got it

@naim5am
Copy link

naim5am commented Feb 6, 2022

https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/
Few days ago, Feb 2nd, Raspberry Pi OS is out of beta. I think it's worth trying official Conda install methods again. I will update this comment with results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment