简体   繁体   English

Python-无法在Mac上安装模块

[英]Python - Can't install modules on mac

I've downloaded Beautiful Soup 4.3.2 and CD'ed to the right location on my disk. 我已经下载了Beautiful Soup 4.3.2,并已将CD安装到磁盘上的正确位置。 When I use 'python setup.py install' a load of lines run but then I get this problem: 当我使用'python setup.py install'时,运行了许多行,但是我遇到了这个问题:

error: could not create '/Library/Python/2.7/site-packages/bs4': Permission denied 错误:无法创建'/Library/Python/2.7/site-packages/bs4':权限被拒绝

Anyone know why this is? 有人知道为什么吗?

Thanks a lot! 非常感谢!

You will often have to use sudo on mac, eg sudo python ... 您将经常需要在Mac上使用sudo,例如sudo python ...

This has been asked multiple times though, try searching before asking. 但是,已多次询问该问题,请在询问之前尝试搜索。

Apparently, your limits of authority is lower a little to install the python. 显然,安装python的权限有所降低。

First, you should change your users to root. 首先,您应该将用户更改为root。 commnad: su root commnad: su root

Second,execute commands to install python. 其次,执行命令以安装python。

I hope this can help you. 希望对您有所帮助。

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

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