运行zc.buildout时出现AssertionError

时间:2013-02-20 10:13:54

标签: django buildout

我在使用buildout时遇到了问题。我使用

下载bootstrap.py
wget http://downloads.buildout.org/2/bootstrap.py

buildout.cfg

[buildout]
parts = python
        django
develop = .
eggs = beautifulsoup
       .....

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

[django]
recipe = djangorecipe
wsgi = true
eggs = ${buildout:eggs}

当我尝试 ./ bin / buildout 时。 我收到以下错误。

Upgraded:
  distribute version 0.6.35;
restarting.
Generated script '/home/tests/myproject/bin/buildout'.
Develop: '/home/tests/myproject/.'
While:
  Installing.
  Processing develop directory '/home/tests/myproject/.'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 1808, in main
    getattr(buildout, command)(args)
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 468, in install
    installed_develop_eggs = self._develop()
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 709, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/easy_install.py", line 862, in develop
    return _copyeggs(tmp3, dest, '.egg-link', undo)
  File "/home/tests//eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/easy_install.py", line 803, in _copyeggs
    assert len(result) == 1, str(result)
AssertionError: []

任何人都可以帮我解决。

2 个答案:

答案 0 :(得分:1)

你真的想用virtualenv设置来运行它;在基于包的操作系统(如Debian,Ubuntu,RedHat等)上,您很容易遇到系统安装的distribute,easy_install和其他第三方软件包之间的冲突,以及buildout所需的内容(请参阅http://workaround.org/easy-install-debian解释为什么)。

答案 1 :(得分:0)

问题在于这里不是buildout,而是setuptools:它被分成了distribute和setuptools,然后是两者的重聚,进一步的开发。未来看起来很适合setuptools。但是过去的幽灵仍然在寻找我们。

Download a bootstrap.py fetching the latest setuptools

将zc.buildout固定为> = 2.2.1并将setuptools固定为> = 2.2 - 将版本部分添加到buildout.cfg:

[versions]
zc.buildout = >= 2.2.1
setuptools = >= 2.2

与virtualenv> = 1.9.1一起使用参数--no-setuptools所以运行:

virtualenv --no-setuptools env
./env/bin/python bootstrap.py
./bin/buildout