user2729670
user2729670

Reputation: 46

Permission denied error installing Pillow (PIL) on mac

I'm attempting to install the Pillow fork of PIL, and every method I've tried results in this error:

unable to execute /: Permission denied

error: command '/' failed with exit status 1

This occurs

  1. using pip install Pillow
  2. using easy_install Pillow-master.zip
  3. using python setup.py install
  4. using python setup.py build

The last is the most confusing to me, honestly. I can't even build the module in the same directory it's been extracted to.

I've made sure to install all of the prereqs using homebrew, just as the Pillow readme suggests.

This error has not occurred when installing other python modules.

Edit: I have run all of these commands with and without sudo.

Upvotes: 2

Views: 1667

Answers (4)

Mukul Kirti Verma
Mukul Kirti Verma

Reputation: 584

It look like you have activated your virtual environment, in such case you have to run the following cmd

sudo python -m pip install Pillow

Upvotes: 0

Ian Christy
Ian Christy

Reputation: 101

Jan 2021 Mac OS Big Sur 11.1 brew install samueljohn fails ...

brew install samueljohn/python/pillow
==> Tapping samueljohn/python
Cloning into '/usr/local/Homebrew/Library/Taps/samueljohn/homebrew-python'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/samueljohn/homebrew-python/'
Error: Failure while executing; `git clone https://github.com/samueljohn/homebrew-python /usr/local/Homebrew/Library/Taps/samueljohn/homebrew-python` exited with 128.

Upvotes: 0

sam
sam

Reputation: 355

I am a newbie, I tried everything you did for the last 24 hours... Then I did the following

  1. I installed Xcode and then installed Command line tools (Go to Xcode preference menu, click on downloads, select and install command line).

  2. I then installed brew (I had been using macports and I kept getting some permission errors)

  3. this is the surprising bit.. I then tried using:

    easy_install pillow

and it worked, no more errors... I have no idea if step 1 and 2 above had anything to do with step 3 working, or its because I stopped trying to install PIL and instead went for pillow but its now working.

So what am I saying, try using easy_install pillow read more about pillow here (http://www.pythonforbeginners.com/modules-in-python/how-to-use-pillow/)

Good luck, let me know if it works.. if anyone has any idea why mine worked as well, let me know.

Upvotes: 1

Mike Belanger
Mike Belanger

Reputation: 111

I'm assuming you've solved the problem by now. If you haven't, you can now install pillow using brew by going

brew install samueljohn/python/pillow.

Why it isn't just brew install pillow is beyond me.

Upvotes: 1

Related Questions