0

I'm having trouble getting Pillow to install. Here's the full traceback:

Collecting Pillow
 Using cached Pillow-4.0.0-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
Collecting olefile (from Pillow)
 Using cached olefile-0.44.zip
Installing collected packages: olefile, Pillow
 Running setup.py install for olefile ... error
 Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-QHsEXV-record/install-record.txt --single-version-externally-managed --compile:
 running install
 running build
 running build_py
 creating build
 creating build/lib
 copying OleFileIO_PL.py -> build/lib
 creating build/lib/olefile
 copying olefile/__init__.py -> build/lib/olefile
 copying olefile/olefile.py -> build/lib/olefile
 copying olefile/README.rst -> build/lib/olefile
 copying olefile/README.html -> build/lib/olefile
 copying olefile/LICENSE.txt -> build/lib/olefile
 copying olefile/CONTRIBUTORS.txt -> build/lib/olefile
 running install_lib
 creating /Library/Python/2.7/site-packages/olefile
 error: could not create '/Library/Python/2.7/site-packages/olefile': Permission denied
 ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-QHsEXV-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/

The error seems to be 'Permission denied' when attempting to create the folder; though I cannot understand why...

My machine is running Mac OSX, and I'm using Terminal to run the commands for this Django project.

asked Feb 20, 2017 at 18:26

2 Answers 2

1

Because the normal user doesn't have permission to install packages globally. Either run with sudo, or - much better - use a virtualenv and install your packages in there.

answered Feb 20, 2017 at 18:35
Sign up to request clarification or add additional context in comments.

Comments

0

There're several questions regarding this problem, I'd suggest to take a look at these:

I prefer the second one but it also depends on your project/app structure

answered Feb 20, 2017 at 18:51

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.