Search code examples
google-app-enginepython-2.7pyramid

Pyramid on Google’s App Engine using buildout resulting in setuptools not found error


I am trying to run pyramid application on google's app engine using buildout. I followed this link gae_buildout and got struck while running the buildout. Its shows "setuptools not found error" despite of seetuptools being installed in the virtual environment. I tried few work arounds and nothing turned fruitful, any thoughts on this ?

Find the error trace below. I am using pyramid 1.4 version.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "c:\myenv\newproject\eggs\zc.buildout-2.2.1-py2.7.egg\zc\buildout\buildou
t.py", line 1942, in main
    getattr(buildout, command)(args)
  File "c:\myenv\newproject\eggs\zc.buildout-2.2.1-py2.7.egg\zc\buildout\buildou
t.py", line 622, in install
    installed_files = self[part]._call(recipe.install)
  File "c:\myenv\newproject\eggs\zc.buildout-2.2.1-py2.7.egg\zc\buildout\buildou
t.py", line 1366, in _call
    return f()
  File "c:\myenv\newproject\eggs\rod.recipe.appengine-2.0.2-py2.7.egg\rod\recipe
\appengine\__init__.py", line 377, in install
    self.copy_packages(ws, temp_dir)
  File "c:\myenv\newproject\eggs\rod.recipe.appengine-2.0.2-py2.7.egg\rod\recipe
\appengine\__init__.py", line 284, in copy_packages
    self.write_pkg_resources(ws, lib)
  File "c:\myenv\newproject\eggs\rod.recipe.appengine-2.0.2-py2.7.egg\rod\recipe
\appengine\__init__.py", line 267, in write_pkg_resources
    assert len(setuptools_eggs) == 1, "setuptools not found"
AssertionError: setuptools not found

Solution

  • Got the same (Ubuntu 12.04) and finally solved the problem by changing ae-sdk-version to 1.8.0 from buildout.cfg

    Open buildout.cfg and change the line:

    ae-sdk-version=1.7.5
    

    to:

    ae-sdk-version=1.8.0
    

    ...or the latest one from here. Now seems to be 1.8.5, but 1.8.0 worked for me.

    The problem in fact comes because PyPI is not serving last version of pyramid_appengine. It's serving 0.8.1 and should be (latest) 0.8.2-a2. You can download and install in your virtualenv the latest version in a tarball from here: https://pypi.python.org/pypi/pyramid_appengine/