Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X El Capitan pip install OSError: [Errno 13] Permission denied #11509

Closed
matrixko opened this issue Dec 22, 2016 · 7 comments
Closed

Mac OS X El Capitan pip install OSError: [Errno 13] Permission denied #11509

matrixko opened this issue Dec 22, 2016 · 7 comments

Comments

@matrixko
Copy link

@matrixko matrixko commented Dec 22, 2016

Hi,
Sorry to bother you but I can't manage to install your program (it looks awesome by the way, I would love to have it !)
I tried to use the command pip install youtube-dl but I get the following

MacBook-Pro-de-lukitsa:~ lukitsa$ pip install youtube-dl
Collecting youtube-dl
  Using cached youtube_dl-2016.12.22-py2.py3-none-any.whl
Installing collected packages: youtube-dl
Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py", line 377, in move_wheel_files
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
**OSError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/share/doc/youtube_dl'**

Is there anyone who can help me with this ? By the way I am on Mac OS X 10.11.6 El Capitan and unfortunately I can't use any other installation way like Homebrew because of my work. They use program and didn't allow you to change any main architecture of your mac (unless you don't want support anymore.. sorry)
Many thanks in advance for your help

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 22, 2016

Read FAQ and copy paste pip command from there.

@dstftw dstftw closed this Dec 22, 2016
@matrixko
Copy link
Author

@matrixko matrixko commented Dec 22, 2016

Thank you for your reply but that's what I did. They say that you have to use sudo but I can't use this command. Is there any other way ?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 23, 2016

pip install youtube-dl --user and add $HOME/Library/Python/2.7/bin to $PATH

@matrixko
Copy link
Author

@matrixko matrixko commented Dec 23, 2016

Thanks for helping @yan12125 but I don't have the folder /Library/Python/2.7/bin, I only have /Library/Python/2.7 and in there, there is only a site-packages folder.. Sorry I really am a beginner in programming and stuff

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 23, 2016

$HOME/Library/Python/2.7/bin, not /Library/Python/2.7/bin. You can also use ~/Library/Python/2.7/bin

@matrixko
Copy link
Author

@matrixko matrixko commented Dec 23, 2016

@yan12125 Okay thanks but where do I add $HOME/Library/Python/2.7/bin to path ? I'm really sorry I know you just gave me the answer but I can't figure out exactly what I have to write in the terminal.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 23, 2016

Like this:

export PATH="$HOME/Library/Python/2.7/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.