How to make my virtualenv see this compiled module installed at the system level?

I installed the python-gconf package on Ubuntu 12.04 and played with it: this is a python binding to the gnome configuration tool and there is no pypi package for it.

Once I created virtualenv ( without --no-site-packages ), any attempt to import gconfwill result in ImportError.

The module gconfworks fine at the system level, but not in virtual env. I researched, and the discovery of python-gconf.deb taught me that it was just a gconf.so binary.

A search for it suggests that it was installed in / home / lib / python 2.7 / dist-packages / gtk-2.0 / gconf.so

I tried to force Python hands:

sudo ln -s /usr/lib/python2.7/dist-packages/gtk-2.0/gconf.so ~/.virtualenvs/appetizer/lib/python2.7/site-packages/

But this only led to:

>>> import gconf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: could not import gobject (error was: 'No module named gobject')

So, I guess this is very dependent on GTK.

+5
2

virtualenv --system-site-packages, . Symlinking virtualenv , .

+4

, no-global-site-packages.txt, .

0

All Articles