好的,所以我买了专业Plone 4开发,我现在正在尝试完成初始设置。以下是我到目前为止所做的事情:
首先,我创建了一个名为pl
的虚拟环境和该项目的目录,也称为pl
。
其次,我使用pip
在PIL
虚拟环境中安装pl
。它似乎有效。
第三,我在buildout.cfg
目录中创建了一个名为pl
的文件。它的内容如下:
[buildout]
extends = http://dist.plone.org/releases/4.2/versions.cfg
parts = instance
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs = Plone
(我从第36页的标题为“最小构建”的部分直接从Plone 4书中获取了此buildout.cfg
文件。)
第四,我在此位置下载了bootstrap.py
文件 - http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.2/bootstrap.py - 并按照本书的说明将其放在我的pl
目录中。
第五,在我的pl
目录中,激活了pl
虚拟环境,我运行了命令python bootstrap.py --distribute
然后我收到以下错误:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.29.tar.gz Extracting in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmp97GJFJ Now working in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmp97GJFJ/distribute-0.6.29 Building a Distribute egg in /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40 /var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/distribute-0.6.29-py2.7.egg While: Initializing. An internal error occured due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1682, in main user_defaults, windows_restart, command) File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 198, in __init__ data['buildout'].copy(), override)) File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1356, in _open eresult = _open(base, extends.pop(0), seen, dl_options, override) File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1306, in _open path, is_temp = download(filename) File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/download.py", line 96, in __call__ local_path, is_temp = self.download(url, md5sum, path) File "/private/var/folders/xk/5xt9s5vd4bqd731qdkmxkxyr0000gn/T/tmpvHtk40/zc.buildout-1.4.4-py2.7.egg/zc/buildout/download.py", line 173, in download tmp_path, headers = urllib.urlretrieve(url, tmp_path) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 91, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 237, in retrieve fp = self.open(url, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 205, in open return getattr(self, name)(url) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 356, in open_http return self.http_error(url, fp, errcode, errmsg, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 373, in http_error return self.http_error_default(url, fp, errcode, errmsg, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 379, in http_error_default raise IOError, ('http error', errcode, errmsg, headers) IOError: ('http error', 404, 'Not Found', )
如果您想知道,我正在使用python 2.7.2和pip freeze
输出以下内容:
PIL==1.1.7
wsgiref==0.1.2
答案 0 :(得分:3)
尝试将buildout中的网址更改为:
而不是
http://dist.plone.org/的释放强> /4.2/versions.cfg
看起来错误的网址导致IOError: ('http error', 404, 'Not Found', )
另外,第二步,尝试运行:
bin/python bootstrap.py --distribute
(bin /非常重要,因此你肯定会启动virtualenv版本的python)。你的追溯表明运行' python'本身就是调用系统python(注意提及的所有路径' / System / Library / Frameworks '。