Plone - 运行bootstrap.py以启动一个新项目失败:“用作下载缓存的目录不存在。”

时间:2012-10-25 19:39:43

标签: plone zope bootstrapper buildout

我采取了以下步骤:

首先 - 创建名为pln41的目录和名为pln41的virtualenv。 (我在virtualenv中安装了PIL。)

第二次 - 进入目录并运行:

wget http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.1/bootstrap.py

第三次 - 创建了以下buildout.cfg文件:

[buildout]
extends = http://dist.plone.org/release/4.1/versions.cfg
parts = instance 

[instance] 
recipe = plone.recipe.zope2instance
user = admin:admin
eggs = Plone

第四 - 运行`python bootstrap.py --distribute

该程序产生以下输出并崩溃:

Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.30.tar.gz
Extracting in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpLrULV3
Now working in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpLrULV3/distribute-0.6.30
Building a Distribute egg in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmp54ZJQK
/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmp54ZJQK/distribute-0.6.30-py2.7.egg
While:
  Initializing.
Error: The directory:
'/Users/Jon/dev/pln41/~/.buildout/extends'
to be used as a download cache doesn't exist.

现在,我的主目录中有一个名为.builtout/的目录。问题是将~符号放在路径的中间,就像bootstrap试图做的那样,正在产生问题。如果我尝试从任何地方运行cd /Users/Jon/dev/pln41/~/.buildout/,我会得到一个“没有这样的文件或目录”,但是如果我运行cd ~/.buildout/那么一切正常。为什么引导程序会创建此路径: /Users/Jon/dev/pln41/~/.buildout/extends

1 个答案:

答案 0 :(得分:3)

~/.buildout/default.cfg文件中有什么内容?我希望如此:

[buildout]
eggs-directory = /Users/Jon/.buildout/eggs
download-cache = /Users/Jon/.buildout/downloads
extends-cache  = /Users/Jon/.buildout/extends

确保您已创建这些行引用的目录。