权限被拒绝Setuptools

时间:2015-06-15 11:40:35

标签: python django curl setuptools

我正在尝试在我的Mac上安装setuptools,但是当我运行命令curl https://bootstrap.pypa.io/ez_setup.py -o - | python时会显示一条消息:

   Processing setuptools-17.1.1-py3.4.egg
   Removing /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools-17.1.1-py3.4.egg
   Copying setuptools-17.1.1-py3.4.egg to /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
   Adding setuptools 17.1.1 to easy-install.pth file error: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/easy-install.pth'
   Something went wrong during the installation.
   See the error message above.

2 个答案:

答案 0 :(得分:1)

python命令需要sudo才能写入/Library/Frameworks...

curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo  python

答案 1 :(得分:0)

您需要使用sudo以root用户身份运行。这应该是可以转让的。 :)

另见: