微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我尝试使用自制软件安装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),它运行正常.

解决方法:

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

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

解释:sudo允许管理员权限(输入适当的密码后允许’超级用户’),chmod允许管理员“更改文件模式”,’7’表示(4 [读取] 2 [写入] 1 [执行]),第一个’7’表示’所有者’,第二个’7’表示’组’,第三个’7’表示’其他’;所以将允许管理员权限,以便为所有者,组和其他人将文件模式更改为“rwx”.命令的最后一部分是您想要chmod的文件.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐