Ok, so I bought Professional Plone 4 Development and I am now trying to work through the initial setup. Here is what I have done so far:
First, I created a virtual environment called pl
and a directory for this project, also called pl
.
Second, I used pip
to install PIL
in the pl
virtual environment. It appears to have worked.
Third, I created a file called buildout.cfg
in the pl
directory. It's contents are as follows:
[buildout]
extends = http://dist.plone.org/releases/4.2/versions.cfg
parts = instance
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs = Plone
(I took this buildout.cfg
file directly from the Plone 4 book from the section titled "A Minimum Buildout" on page 36.)
Fourth, I downloaded the bootstrap.py
file at this location - http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.2/bootstrap.py - and placed it in my pl
directory -- per the book's instructions.
Fifth, From my pl
directory, with the pl
virtual environment activated, I ran the command python bootstrap.py --distribute
And then I got the following error:
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', )
In case you're wondering, I'm using python 2.7.2 and pip freeze
outputs the following:
PIL==1.1.7
wsgiref==0.1.2
Try changing the URL in your buildout to:
Instead of
http://dist.plone.org/releases/4.2/versions.cfg
It looks like the wrong URL is causing a IOError: ('http error', 404, 'Not Found', )
Also, secondarily, for step 4 try running:
bin/python bootstrap.py --distribute
(the bin/ is important so that you're definitely launching the virtualenv version of python). Your traceback suggests that running 'python' by itself is calling the system python (note all the paths that mention '/System/Library/Frameworks'.