Mac下安装Pthon的nump库失败的解决方法

在安装numpy库时,出现了这样的错误:

安装命令:

easy_install numpy

错误:

MacdeMacBook-Pro-3:python mac$ easy_install numpy
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-785.write-test'

什么原因呢?通过分析错误提示,"[Errno 13] Permission denied:"原来是权限问题,需要超级管理员权限:

sudo easy_install numpy

安装成功:

MacdeMacBook-Pro-3:python mac$ sudo easy_install numpy
Password:
Searching for numpy
Best match: numpy 1.6.2
Adding numpy 1.6.2 to easy-install.pth file

Using /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Processing dependencies for numpy
Finished processing dependencies for numpy
MacdeMacBook-Pro-3:python mac$

关键字:Python, numpy

版权声明

本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处。如若内容有涉嫌抄袭侵权/违法违规/事实不符,请点击 举报 进行投诉反馈!

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部