1

I'm attempting to install the Python Imaging Library on Ubuntu 15.10 by running pip install PIL. When I try and run that (or even pip uninstall PIL) I get this error:

Traceback (most recent call last):   File "/usr/bin/pip", line 9, in
<module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()   File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 357,
in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)   File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2394,
in load_entry_point
    return ep.load()   File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2108,
in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])   File
"/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in
<module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa   File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9,
in <module>
    from pip.download import path_to_url   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 22, in
<module>
    import requests, six   File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line
53, in <module>
    from .packages.urllib3.contrib import pyopenssl   File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py",
line 43, in <module>
    ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD, AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3

Can anyone suggest why I can't install or uninstall pip?

3
  • Did you do sudo pip or just pip?
    – user323419
    Dec 22, 2015 at 0:58
  • @HeatherBrown both and still get the same result Dec 22, 2015 at 17:58
  • Try reinstalling pip with sudo apt-get install --reinstall python-pip
    – user323419
    Dec 22, 2015 at 18:38

1 Answer 1

1

There is a new fork of PIL called Pillow, you can install it by typing :

sudo apt-get build-dep python-imaging
sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
sudo pip install Pillow

You can see the Official Documentation page for more informations.

To verify the version, just type :

>>> import PIL
>>> PIL.VERSION
'x.x.x'

x.x.x is the version number

1
  • Thanks, but I'm trying to install PIL, not a fork of it. Dec 22, 2015 at 17:58

Not the answer you're looking for? Browse other questions tagged .