脚本宝典收集整理的这篇文章主要介绍了Mac下安装Python的numpy库失败的解决方法,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
在安装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$
以上是脚本宝典为你收集整理的Mac下安装Python的numpy库失败的解决方法全部内容,希望文章能够帮你解决Mac下安装Python的numpy库失败的解决方法所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。