Uninstall the Preinstalled Pil

Uninstall the Preinstalled Pil

I would like to install Pillow, but according to the Pillow's documentation, I must remove PIL first, which seems to have come preinstalled in Ubuntu 13.10.

What's the best way to do that?

2 Answers

The easiest way to uninstall pil is using pip:

sudo pip uninstall pil

and then install pillow using pip:

sudo pip install pillow

(see here for installing pip)

2

Try the following:

Completely remove PIL/pillow (2.7 & 3.5):

$ sudo -H pip uninstall pillow
-> Successfully uninstalled Pillow-3.1.2
$ sudo -H pip3 uninstall pillow
-> Cannot uninstall requirement pillow, not installed

Completely remove pip & pip3:

$ which pip
/usr/local/bin/pip

$ /usr/local/bin/pip uninstall pip
$ sudo apt-get remove python-pip 

Remove Egg (from easy_install):

Install pip & pip3:

$ sudo apt-get install python-pip
$ sudo apt-get install python3-pip

$ sudo easy_install pip     <- Installs to different directory (egg)
$ sudo easy_install pip3    <- Installs to different directory (egg)

Install pillow (2.7 & 3.5):

sudo -H pip3 install pillow
-> Installed Pillow-4.1.1-cp27-cp27mu-manylinux1_x86_64.whl
sudo -H pip install pillow
-> Requirement already satisfied

$ sudo easy_install Pillow
Searching for Pillow
Best match: Pillow 4.1.1
Adding Pillow 4.1.1 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Processing dependencies for Pillow
Finished processing dependencies for Pillow

$ sudo pip3 install Pillow
Requirement already satisfied: Pillow in ./.local/lib/python2.7/site-packages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.