【问题标题】:DistributionNotFound error when trying to bootstrap [duplicate]尝试引导时出现 DistributionNotFound 错误 [重复]
【发布时间】:2013-07-23 14:15:22
【问题描述】:

我正在尝试使用 zc.buildout 并引导它。但在引导过程中出现错误:

cleg$ /usr/local/bin/python bootstrap.py
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
Extracting in /var/folders/ky/t76hxgx529s642rfd8vywd280000gn/T/tmpAXsdCh
Now working in /var/folders/ky/t76hxgx529s642rfd8vywd280000gn/T/tmpAXsdCh/distribute-0.6.49
Building a Distribute egg in /var/folders/ky/t76hxgx529s642rfd8vywd280000gn/T/tmpQuAu95
/var/folders/ky/t76hxgx529s642rfd8vywd280000gn/T/tmpQuAu95/distribute-0.6.49-py2.7.egg
Traceback (most recent call last):
  File "bootstrap.py", line 253, in <module>
    ws.require(requirement)
  File "build/bdist.macosx-10.7-x86_64/egg/pkg_resources.py", line 698, in require
  File "build/bdist.macosx-10.7-x86_64/egg/pkg_resources.py", line 596, in resolve
pkg_resources.DistributionNotFound: setuptools>=0.7

我尝试将项目与系统隔离,并使用 Virtualenv 创建“干净”的 python,但得到了同样的错误。

我尝试使用 pip 更新 setuptools,在 site-packages 文件夹中我有 setuptools-0.9.5-py2.7.egg,但似乎 bootstrap 没有看到它。

我使用的是用自制软件构建的 python 2.7.5。如何解决此问题?

【问题讨论】:

  • 异常略有不同,但底层问题是一样的;您的 bootstrap.py 需要更新才能切换回 setuptools
  • @MartijnPieters 感谢您为我指出可能的答案,我会尝试,如果没问题 - 将关闭问题。

标签: python setuptools buildout


【解决方案1】:

您应该使用此 URL 中的引导文件: http://downloads.buildout.org/2/bootstrap.py

也许您还必须按照此问题的说明进行操作: How to solve pkg_resources.VersionConflict error during bin/python bootstrap.py -d

【讨论】:

  • 这就是为什么我投票结束这个问题作为一个骗子。请注意,我的回答包括有关升级引导脚本的说明,但这可能还不够
猜你喜欢
  • 1970-01-01
  • 2017-12-11
  • 2017-11-07
  • 2013-02-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-09
相关资源
最近更新 更多