尝试引导时发生DistributionNotFound错误

时间:2013-07-23 14:15:23

标签: python setuptools buildout

我正在尝试使用zc.buildout并引导它。但是在bootstrap期间我遇到了错误:

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。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

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

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