-1

I get this error when I try to install Pillow using the terminal:

pip install pillow
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/7e/bb/d502ae951099ce9a5a20dec21e577f304b7706321f83205c5215ebc028cd/Pillow-5.4.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 1.3MB/s 
Installing collected packages: pillow
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/Pillow-5.4.1.dist-info'
Consider using the `--user` option or check the permissions.

What can I do to avoid this error and successfully install Pillow?

PTH
  • 51
  • 6
  • maybe do `sudo pip install pillow` instead – Hippolippo Jan 17 '19 at 16:45
  • I don't really do mac – Hippolippo Jan 17 '19 at 16:45
  • @Hippolippo Thank you so much! That worked. But I'm really new to programming in general, so I don't really understand what exactly sudo and pip are. If it's not too much to ask, would you mind explaining the to me? – PTH Jan 17 '19 at 16:48
  • Possible duplicate of [pip install -r: OSError: \[Errno 13\] Permission denied](https://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied) – phd Jan 17 '19 at 18:41
  • https://stackoverflow.com/search?q=%5Bpip%5D+OSError%3A+Permission+denied – phd Jan 17 '19 at 18:42

1 Answers1

0

The message that you are getting is saying that your user doesn't have permission to edit files where it is attempting to store the module files. Pip is a program that lets you install different python modules. When it runs, by default it will run as you and if you don't have permission to save to that location, it won't. sudo is short for Super-User Do which runs pip as a Super-User which has all the permissions necessary to save to that location.

Hippolippo
  • 803
  • 1
  • 5
  • 28