On Sun, 2009-04-12 at 18:31:18 -0700, Mike Lewis wrote: > I'm having a similar issue. I believe it's related to the virtualenv. > > I can do > > import repoze.what.plugins.quickstart > > after installing it the regular way, but when doing it in virtualenv > it doesn't work, even though I made 100% sure > > > Here's how to repro: > virtualenv virttest > cd virttest > source bin/activate > easy_install repoze.what-quickstart repoze.what-pylons > ipython > >> import repoze.what.plugins.quickstart
This is because ipython doesn't know anything about your virtualenv. You can see for yourself: In [1]: import sys In [2]: print sys.path The Python interpreter included in virtualenv is set up to look for its site-packages in addition to global site-packages (unless --no-site-packages was provided), so you should use it instead of ipython. You can also use paster shell command if you have Pylons installed in your virtualenv. It will try to run ipython first (and fall back to Python interactive interpreter if ipython can't be found), also it will setup sys.path for you. -- Audrius Kažukauskas
pgpTcKad7Qg3l.pgp
Description: PGP signature
