【问题标题】:How do I get easy_install to use the right version of setuptools?如何让 easy_install 使用正确版本的 setuptools?
【发布时间】:2014-05-05 17:36:02
【问题描述】:

最新版本的 setuptools (3.5.1) 安装在 /Library/Python/2.7/site-packages 中。但是当我使用 easy_install 时,它在 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python 中使用 setuptools 版本 0.6c12dev_r88846。

【问题讨论】:

    标签: python setuptools easy-install


    【解决方案1】:

    您必须删除旧版本的 setuptools。

    有时并不容易,可能需要尝试:

    • 通过您用来安装它的安装程序将其删除 (brew?, apt-get...)
    • 从目录中手动删除它,包括。安装在您的系统中的脚本(通过which setuptools 找到它们)
    • 最后你应该重新安装setuptools

    如果我没记错的话,setuptools 的安装说明要求先删除旧版本。

    我什至会推荐:

    1. 彻底删除旧的setuptools
    2. 彻底删除最新的setuptools
    3. 删除pip
    4. 通过get_pip.py 安装pip,如下所述:http://pip.readthedocs.org/en/latest/installing.html#install-pip
    5. $ pip install setuptools安装setuptools

    即使这些步骤听起来很复杂,你也应该这样做,否则你迟早会遇到奇怪的问题。

    【讨论】:

      猜你喜欢
      • 2010-12-29
      • 2011-08-23
      • 2011-05-09
      • 2012-01-28
      • 2013-04-25
      • 2011-11-27
      • 1970-01-01
      • 1970-01-01
      • 2014-12-29
      相关资源
      最近更新 更多