Buildout -- Software for automating application assembly

Recipe's sys.path not correct

Reported by Philipp von Weitershausen on 2007-08-19
4
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

Bug Description

Often, recipes themselves require other packages. These will be installed together with the recipe egg when needed. The problem is that these dependencies do not have priority on the sys.path.

For example, zc.zope3recipes requires ZConfig. In particular, it requires a very recent version of ZConfig. Now suppose you have ZConfig on your PYTHONPATH already, but an older version (for reproducibility, try putting a Zope 3.3 installation on your PYTHONPATH). When you now execute a buildout that uses zc.zope3recipes, it will fail with the following error message:

  ImportError:
  No module named schemaless

This is due to the fact that the ZConfig version distributed with Zope 3.3 does not have the ZConfig.schemaless module yet and the newer version that was installed as a dependency is not being prioritized on sys.path.

ToniMueller (support-oeko) wrote :

It also happens while running in a brand new virtualenv (just installed today, on Debian/Etch/amd64):

(virtualgrok)birch 11:05:10 /home/zope/grok
$ grokproject Sample
Enter user (Name of an initial administrator user): admin
Enter passwd (Password for the initial administrator user): admin
Enter eggs_dir (Location where zc.buildout will look for and place packages) ['/home/toni/buildout-eggs']: /home/zope/grok/buildout-eggs
Creating directory ./Sample
Downloading zc.buildout...
Invoking zc.buildout...
While:
  Installing.
  Getting section app.
  Initializing section app.
  Loading zc.buildout recipe entry zc.zope3recipes>=0.5.3:application.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:

ImportError:
No module named schemaless

Kevin Teague (kevin-bud) wrote :

I just bumped into this error. In my case it was because of a polluted site-packages directory(I had a zope.pth which pointed to an old version of ZConfig). Toni can you try creating your virtualenv with the "--no-site-packages" to ensure you have a virtualenv that doesn't pick-up anything you have installed in site-packages?

ToniMueller (support-oeko) wrote :

Yes, I've tried this in the meantime, but it did not help. Under Debian Etch at least, the problem now looks like this to me:

If one wants python-psycopg2da, then zope3 is pulled in as a dependency. This triggers the aforementioned problem. If one removes zope3 (and python-psycopg2da as a consequence), the problem goes away.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers