Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install PIL (or any module really) to the raspberry pi?

I want to install PIL and python-numpy at the least. I want to turn an image into an array but really can't seem to find info on installing/using modules to raspberry pi. Could somebody just explain?

like image 368
Sam Walls Avatar asked Nov 02 '22 16:11

Sam Walls


1 Answers

Assuming that you are using the Raspberry Pi Foundation's recommended Raspbian image, those packages are available through the package manager. For numpy, you want to run this as root, using sudo if appropriate:

apt-get install python-numpy

Installing PIL is similar; just find the package name for PIL and apt-get it. I don't know it myself, but using "apt-cache search " and grep will find it for you fairly quickly.

like image 80
mfabel Avatar answered Nov 15 '22 04:11

mfabel