Python - 无法在mac上安装模块

时间:2015-06-10 21:34:24

标签: python module install

我已将Beautiful Soup 4.3.2和CD下载到我磁盘上的正确位置。当我使用' python setup.py install'一大堆线路运行,但后来我遇到了这个问题:

错误:无法创建' /Library/Python/2.7/site-packages/bs4':权限被拒绝

任何人都知道这是为什么?

非常感谢!

2 个答案:

答案 0 :(得分:-1)

你经常需要在mac上使用sudo,例如sudo python ......

虽然已多次询问,但在询问前尝试搜索。

答案 1 :(得分:-1)

显然,安装python时你的权限有限。

首先,您应该将用户更改为root用户。 commnad:*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } body { font-family: 'Lato'; background-color: #E8E8E8; } #header { width:100%; background-color: #27272D; height: 50px ; border:1px solid; position:relative; } #main{ border:1px solid; width:100%; height:100%; } #container{ margin-top: 100px; border:1px; } form { max-width: 300px; margin: 10px auto; padding: 10px 20px; border-radius: 3px; background-color: white; border:1px; } #form_title { margin: 10px 0 30px 15px; font-size:20px; } input[type="text"], select { background: rgba(255,255,255,0.1); border: none; font-size: 16px; height: auto; margin: 0; outline: 0; padding: 15px; width: 100%; background-color: #e8eeef; color: #8a97a0; box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset; margin-bottom: 20px; } input[type="text"]{ border-radius: 6px; -moz-border-radius: 6px; -khtml-border-radius: 6px; -webkit-border-radius: 6px; height:44px; font-size: 14px; } select { padding: 6px; height: 44px; border-radius: 2px; } button { color: #FFF; background-color: #13ABAF; font-size: 14px; text-align: center; font-style: normal; border-radius: 5px; width: 96%; height:44px; border: 1px solid; border-width: 1px 1px 3px; margin-bottom: 10px; margin-left: 10px; } fieldset { border: none; } legend { font-size: 17px; margin-bottom: 24px; } label { display: block; margin-bottom: 8px; } label.light { font-weight: 300; display: inline; } #horizontal-line{ display: block; margin-top:100px; margin-bottom: 60px; width:96%; margin-left: auto; margin-right: auto; border-style: inset; border-width: 1px; border-color: #F0F0F0; } #footer { position : absolute; bottom : 0; height:60px; margin-top : 40px; text-align: center ; font-size: 10px ; font-family: 'Lato' ; } @media screen and (min-width: 480px) { form { max-width: 480px; } }

其次,执行命令安装python。

我希望这可以帮到你。

相关问题