首先請確定你的電腦已經安裝 Python 以及 pip
pi@raspb2:~ $ python --version
Python 2.7.13
pi@raspb2:~ $ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
更新pip的版本...
pi@raspb2:~/Downloads $ pip install -U pip
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 39kB/s
Installing collected packages: pip
Successfully installed pip-9.0.1
phython3.X對應的pip3安裝
pi@raspb2:~/Downloads $ pip3 install matplotlib