简体   繁体   English

点安装错误:[Errno13]权限被拒绝

[英]Pip install error: [Errno13] Permission Denied

I'm trying to install nltk package to my Python2.7, but I've been having some trouble. 我正在尝试将nltk软件包安装到我的Python2.7中,但是遇到了一些麻烦。 I checked other pages already but didn't seem to work for me. 我已经检查了其他页面,但似乎对我没有用。

When I try to install nltk, I receive a message saying: 当我尝试安装nltk时,收到一条消息:

Could not find a version that satisfies the requirement nltk (from    versions: )
No matching distribution found for nltk

Which led me to use: 导致我使用:

curl https://bootstrap.pypa.io/get-pip.py | python

Then it seemed to work, but then I get permission error [Errno13]: 然后它似乎可以工作,但是随后出现权限错误[Errno13]:

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip'
Consider using the `--user` option or check the permissions.

So I tried giving sudo chmod 700 and 770 to the directory file, but kept getting the same permission error. 因此,我尝试将sudo chmod 700和770赋予目录文件,但始终出现相同的权限错误。 I feel like I am missing something. 我觉得我想念什么。 Any help would be appreciated! 任何帮助,将不胜感激!

Your problem is you are trying to add a package to the system python. 您的问题是您试图将软件包添加到系统python中。 Many Mac users install python with homebrew so that they are not changing their system python configuration. 许多Mac用户使用自制软件安装python,以便他们不更改其系统python配置。 This SO has a good description of python on OSX/Macos: 该SO在OSX / Macos上对python有很好的描述:

What should be my python packages path for a user install on MacOS? 在MacOS上安装用户时,我的python软件包路径应该是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM