You can use pyenv, but I don't think Raspberry Pi needs so many environments, so the bottom is easier.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git gcc make openssl python-dev
$ sudo apt-get install libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
$ sudo apt-get install tk-dev python-tk libfreetype6-dev
$ sudo apt-get install pkg-config libjpeg8-dev libpng12-dev
$ sudo apt-get install python-numpy python-scipy python-matplotlib
[option] opencv
$ sudo apt-get update
$ sudo apt-get install -y libopencv-dev
$ sudo apt-get install -y python-opencv
Recommended Posts