【发布时间】: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