nish nish - 2 months ago 22
Python Question

Error Installing PIL using pip

I am Trying to install PIL using pip using the command: pip install PIL

but i am getting the following error and i have no idea what it means. Could someone please help me out.

nishant@nishant-Inspiron-1545:~$ pip install PIL
Requirement already satisfied (use --upgrade to upgrade): PIL in /usr/lib/python2.7/dist-packages/PIL
Cleaning up...
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/", line 104, in main
status =, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/", line 265, in run
File "/usr/lib/python2.7/dist-packages/pip/", line 1081, in cleanup_files
File "/usr/lib/python2.7/dist-packages/pip/", line 29, in rmtree
File "/usr/lib/python2.7/", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/dist-packages/pip/", line 46, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
OSError: [Errno 1] Operation not permitted: '/home/nishant/build/pip-delete-this-directory.txt'

Storing complete log in /home/nishant/.pip/pip.log
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.1', 'console_scripts', 'pip-2.7')()
File "/usr/lib/python2.7/dist-packages/pip/", line 116, in main
return command.main(args[1:], options)
File "/usr/lib/python2.7/dist-packages/pip/", line 141, in main
log_fp = open_logfile(log_fn, 'w')
File "/usr/lib/python2.7/dist-packages/pip/", line 168, in open_logfile
log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/nishant/.pip/pip.log'


You have a permission problem. Try:

sudo pip install -U PIL