我zc.buildout
使用easy_install
. 我使用了http://jacobian.org/writing/django-apps-with-buildout/上的教程。
我的问题是,我无法安装 buildout.cfg 中指定的版本:
[buildout]
parts = python
django
develop = .
versions = versions
eggs = nltk
html5lib
pysolr
python-openid
django-shorturls
[versions]
django = 1.4.1
[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}
[django]
recipe = djangorecipe
当我尝试 ./bin/python
>>> import pysolr
>>> pysolr # it worked from my buildout
<module 'pysolr' from '/home/builout-tests/sandbox/eggs/pysolr-3.0.4-py2.7.egg/pysolr.pyc'>
>>> import django
>>> django.VERSION
(1, 3, 1, 'final', 0) # its my django version in system's python dist-packages
>>> django
<module 'django' from '/usr/lib/python2.7/dist-packages/django/__init__.pyc'>
以及如何为开发和生产版本保留不同版本的 python、django、pylsolr、nltk 等?