How to install PIL with pip on Mac OS?
- Install Xcode and Xcode Command Line Tools as mentioned.
- Use Pillow instead, as PIL is basically dead. Pillow is a maintained fork of PIL.
https://pypi.org/project/Pillow/
pip install Pillow
If you have both Pythons installed and want to install this for Python3:
python3 -m pip install Pillow
This works for me:
apt-get install python-devapt-get install libjpeg-devapt-get install libjpeg8-devapt-get install libpng3apt-get install libfreetype6-devln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/libln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/libln -s /usr/lib/i386-linux-gnu/libz.so /usr/libpip install PIL --allow-unverified PIL --allow-all-external
It is very simple using apt install use this command to get it done
sudo apt-get install python-PIL
or
sudo pip install pillow
or
sudo easy_install pillow