首页 文章

在Mac上安装python依赖项之前安装setuptools

提问于
浏览
0

我需要安装一些python依赖项 . 要使用'easy install'这样做,我想在我的mac上安装setuptools-0.6c11-py2.7.egg(md5) . 我从这里下载了egg文件:https://pypi.python.org/pypi/setuptools/0.6c11 . 然后我尝试通过终端安装:

sh setuptools-0.6c11-py2.7.egg

但是我收到一条错误消息:"can't create or remove files in install directory"(见这里:https://docs.google.com/file/d/0B6GUNg-8d30vblZhYnV3TjZwbDA/edit?usp=sharing) . 我应该尝试另一个目录吗?

1 回答

  • 0

    您命令尝试将文件安装到系统目录中 . 您必须以root身份或使用sudo执行命令:

    sudo sh setuptools-0.6c11-py2.7.egg
    

    你可以看到这个错误:

    [Errno 13] Permission denied
    

    编辑:

    如果您没有't have permissions, you can try installing into your user'的Library文件夹,或者查看virtualenv . (请参阅有关从源本地使用的部分 . )

相关问题