To check if your system have numpy, matplotlib and drawnow installed, enter the command in Python Shell:
>>> import numpy
>>> import matplotlib
>>> import drawnow
If you get error message like this, you have to install it.
ImportError: No module named numpy
ImportError: No module named matplotlob
ImportError: No module named drawnow
Install numpy, matplotlib and drawnow for Python 2:
$ sudo apt-get install python-numpy
$ sudo apt-get install python-matplotlib
$ sudo apt-get install python-pip
$ sudo pip install drawnow
For Python 3:
To install numpy and drawnow for Python 3 on Raspberry Pi, enter the command:
Install for Python 3:
$ sudo apt-get install python3-numpy
$ sudo apt-get install python3-pip
$ sudo pip-3.2 install drawnow
For matplotlib for Python 3, it seem not supported on Raspbian currently. I tried to build from source, refer to the post "Fail to build matplotlib for Python3, run on Raspberry Pi 2".
No comments:
Post a Comment