0

我在使用 buildout 时遇到问题。我下载 bootstrap.py 使用,

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

构建.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: []

任何人都可以帮我解决它。

4

2 回答 2

1

你真的想用 virtualenv 设置运行它;在基于包的操作系统(例如 Debian、Ubuntu、RedHat 等)上,您很容易在系统安装版本的分发、easy_install 和其他第 3 方包之间遇到冲突,以及构建需要什么(参见http://workaround .org/easy-install-debian了解原因)。

于 2013-02-20T10:27:36.760 回答
0

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

下载 bootstrap.py 获取最新的 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
于 2014-08-16T14:26:56.443 回答