I would like to know how to install the latest Anaconda version from Continuum on my Raspberry Pi 3 model B. Any help would be appreciated...
On Raspberry Pi 3 Model B - Installation of Miniconda (bundled with Python 3)
Go and get the latest version of miniconda for Raspberry Pi - made for armv7l processor and bundled with Python 3 (eg.: uname -m)
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
md5sum Miniconda3-latest-Linux-armv7l.sh
bash Miniconda3-latest-Linux-armv7l.sh
After installation, source your updated .bashrc file with source ~/.bashrc. Then enter the command python --version, which should give you:
Python 3.4.3 :: Continuum Analytics, Inc.
Installing Miniconda on Raspberry Pi and adding Python 3.5 / 3.6 / 3.7
Skip the first section if you have already installed Miniconda successfully.
Installation of Miniconda on Raspberry Pi
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
sudo md5sum Miniconda3-latest-Linux-armv7l.sh
sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh
Accept the license agreement with yes
When asked, change the install location: /home/pi/miniconda3
Do you wish the installer to prepend the Miniconda3 install location
to PATH in your /root/.bashrc ? yes
Now add the install path to the PATH variable:
sudo nano /home/pi/.bashrc
Go to the end of the file .bashrc and add the following line:
export PATH="/home/pi/miniconda3/bin:$PATH"
Save the file and exit.
To test if the installation was successful, open a new terminal and enter
conda
If you see a list with commands you are ready to go.
But how can you use Python versions greater than 3.4 ?
Adding Python 3.5 / 3.6 / 3.7 to Miniconda on Raspberry Pi
After the installation of Miniconda I could not yet install Python versions higher than Python 3.4, but i needed Python 3.5. Here is the solution which worked for me on my Raspberry Pi 4:
First i added the Berryconda package manager by jjhelmus (kind of an up-to-date version of the armv7l version of Miniconda):
conda config --add channels rpi
Only now I was able to install Python 3.5, 3.6, 3.7 without the need for compiling it myself:
conda install python=3.5
conda install python=3.6
conda install python=3.7
Afterwards I was able to create environments with the added Python version, e.g. with Python 3.5:
conda create --name py35 python=3.5
The new environment "py35" can now be activated:
source activate py35
I hope this solution will work for you too!
If you're interested in generalizing to different architectures, you could also run the command above and substitute uname -m in with backticks like so:
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-`uname -m`.sh
I was trying to run this on a pi zero. Turns out the pi zero has an armv6l architecture so the above won't work for pi zero or pi one. Alternatively here I learned that miniconda doesn't have a recent version of miniconda. Instead I used the same instructions posted here to install berryconda3
Conda is now working. Hope this helps those of you interested in running conda on the pi zero!
来源:https://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b