pip install matplotlib错误,错误:/usr/local/man/man1/nosetests.1:权限被拒绝

时间:2014-03-31 04:37:59

标签: python python-2.7 matplotlib pip homebrew

尝试使用自制软件安装matplotlib时出现以下错误:

...[tons of output, then:]

running install_data

copying nosetests.1 -> /usr/local/man/man1

error: /usr/local/man/man1/nosetests.1: Permission denied

----------------------------------------
Cleaning up...
Command /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/ys/l1bnz3cx34z3h4mrkny947v40000gr/T/pip_build_schultzm/nose/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/ys/l1bnz3cx34z3h4mrkny947v40000gr/T/pip-xWlPBu-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/ys/l1bnz3cx34z3h4mrkny947v40000gr/T/pip_build_schultzm/nose
Storing debug log for failure in /Users/schultzm/.pip/pip.log

我一直在寻找答案,找不到答案。但是,我解决了这个问题(所以在这里将其发布给其他人):

sudo chmod 777 /usr/local/man/man1/

然后重新运行安装(即pip install matplotlib)并运行正常。

2 个答案:

答案 0 :(得分:5)

sudo chmod 777 /usr/local/man/man1/

然后重新运行安装(即pip install matplotlib

解释:sudo允许管理员权限(允许'超级用户'输入适当的密码后),chmod允许管理员更改文件模式",' 7&# 39;意思是(4 [读] + 2 [写] + 1 [执行]),第一个' 7'意味着'所有者',第二' 7'意味着' group'第三个' 7'意味着'其他人&#39 ;;所以将允许管理员权限,以便将文件模式更改为' rwx'对于所有者,团体和其他人。命令的最后一部分是您想要chmod的文件。

答案 1 :(得分:0)

你是对的。您必须更改权限..如果您具有sudo权限,则无需更改目录权限。