Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@bessonf

This comment has been minimized.

Copy link

commented Jul 2, 2018

What do you mean when you say "Check md5"?

@luisgus

This comment has been minimized.

Copy link

commented Jul 11, 2018

@simoncos

This comment has been minimized.

Copy link
Owner Author

commented Aug 16, 2018

@luisgus warmed my heart

@loganyc1934

This comment has been minimized.

Copy link

commented Oct 31, 2018

Hi, I installed Miniconda 3 on my RPi 3 but can't seem to install any packages.
For example, I ran conda install numpy and got

Fetching package metadata: ....
Solving package specifications: 
Error: Could not find some dependencies for numpy: blas * openblas

You can search for this package on anaconda.org with

    anaconda search -t conda blas * openblas
@moble

This comment has been minimized.

Copy link

commented Nov 13, 2018

@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.

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.

@moble

This comment has been minimized.

Copy link

commented Nov 13, 2018

@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.

@kratzercanby

This comment has been minimized.

Copy link

commented Nov 14, 2018

Hi, I installed Miniconda 3 on my RPi 3 but can't seem to install any packages.
For example, I ran conda install numpy and got

Fetching package metadata: ....
Solving package specifications: 
Error: Could not find some dependencies for numpy: blas * openblas

You can search for this package on anaconda.org with

    anaconda search -t conda blas * openblas

@loganyc1934, I got the same issue, and I followed it down the rabbit hole. I have since unistalled conda from my R Pi for other latex-related reasons, but I'm going to try to sum up what I did to get it going. Since the default conda repositories did not have blas and openblas, I had to first install the Anaconda client to be able to search the general Anaconda repositories:
conda install anaconda-client

Then I searched the extended conda respositories with:
anaconda search -t conda blas
anaconda search -t conda openblas
I'm not sure why the error code suggests searching for "blas * openblas", I couldn't get that to work with the anaconda client. It might just be an accidental type where the "blas * openblas" came from the dependencies error, and was fed directly into the "anaconda search" line.

Once I found a channel with both openblas and blas, I added that to my conda manager. the rpi channel seems like a good channel to add anyway as they have many Raspberry Pi-specific packages. But you could add different channels if you come across this issue with other packages.
conda config --add channels rpi

After the rpi channel is added, you should be able to download both openblas and blas.
conda install openblas blas

Can you install packages other than numpy?

@simulationcoder

This comment has been minimized.

Copy link

commented Dec 30, 2018

Hi, I installed Miniconda 3 on my RPi 3 but can't seem to install any packages.
For example, I ran conda install numpy and got

Fetching package metadata: ....
Solving package specifications: 
Error: Could not find some dependencies for numpy: blas * openblas

You can search for this package on anaconda.org with

    anaconda search -t conda blas * openblas

@loganyc1934, I got the same issue, and I followed it down the rabbit hole. I have since unistalled conda from my R Pi for other latex-related reasons, but I'm going to try to sum up what I did to get it going. Since the default conda repositories did not have blas and openblas, I had to first install the Anaconda client to be able to search the general Anaconda repositories:
conda install anaconda-client

Then I searched the extended conda respositories with:
anaconda search -t conda blas
anaconda search -t conda openblas
I'm not sure why the error code suggests searching for "blas * openblas", I couldn't get that to work with the anaconda client. It might just be an accidental type where the "blas * openblas" came from the dependencies error, and was fed directly into the "anaconda search" line.

Once I found a channel with both openblas and blas, I added that to my conda manager. the rpi channel seems like a good channel to add anyway as they have many Raspberry Pi-specific packages. But you could add different channels if you come across this issue with other packages.
conda config --add channels rpi

After the rpi channel is added, you should be able to download both openblas and blas.
conda install openblas blas

Can you install packages other than numpy?

Thanks for the the following line
conda config --add channels rpi

After this I was able to install all the required packages including numpy
conda install numpy
conda install python
pip install --upgrade pip

@Shumakriss

This comment has been minimized.

Copy link

commented Mar 15, 2019

Why not make it completely non-interactive?

echo 'export PATH="/home/pi/miniconda3/bin:$PATH"' >> /home/pi/.bashrc

@jsheedy

This comment has been minimized.

Copy link

commented Apr 6, 2019

Berryconda worked great for me after experiencing trouble installing some scikit packages with pip and regular conda.

@Bonzadog

This comment has been minimized.

Copy link

commented Apr 7, 2019

I would like to use Conda - but looking at the problems here I will give a wide berth until is has a more stable and RPi orientated version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.