1. Tarek Ziadé
  2. distribute
Issue #166 new

ImportError in declare_namespace

Christophe Combelles
created an issue

I have a working application fully isolated (--no-site-packages) virtualenv, built with buildout. Then I install some packages in the system (sudo aptitude install mayavi2, etc....).

Now my fully isolated application fails with:

{{{ $ ./bin/paster serve deploy.ini Traceback (most recent call last): File "./bin/paster", line 44, in <module> import paste.script.command File "/home/ccomb/buildout-eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 3, in <module> import pkg_resources File "/home/ccomb/buildout-eggs/distribute-0.6.12-py2.6.egg/pkg_resources.py", line 2681, in <module> add_activation_listener(lambda dist: dist.activate()) File "/home/ccomb/buildout-eggs/distribute-0.6.12-py2.6.egg/pkg_resources.py", line 667, in subscribe callback(dist) File "/home/ccomb/buildout-eggs/distribute-0.6.12-py2.6.egg/pkg_resources.py", line 2681, in <lambda> add_activation_listener(lambda dist: dist.activate()) File "/home/ccomb/buildout-eggs/distribute-0.6.12-py2.6.egg/pkg_resources.py", line 2185, in activate map(declare_namespace, self._get_metadata('namespace_packages.txt')) File "/home/ccomb/buildout-eggs/distribute-0.6.12-py2.6.egg/pkg_resources.py", line 1775, in declare_namespace import(parent) ImportError: No module named enthought }}}

I'm not using the "enthought" module in my application. Installing a new package should not impact a working application.

Can pkg_resource be more robust for such cases?