Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using gaetestbed within virtualenv

I'd like to give GAE Testbed a try, but am running into the following error after completing the instructions on its homepage.

$ nosetests --with-gae
...
ImportError: No module named dev_appserver

I've confirmed that this happens in both a virtualenv and outside of one.

like image 299
Matt Norris Avatar asked Jul 06 '10 00:07

Matt Norris


People also ask

Does Tox use virtualenv?

tox is a generic virtualenv management and test command line tool you can use for: checking that your package installs correctly with different Python versions and interpreters. running your tests in each of the environments, configuring your test tool of choice.

Can virtualenv access global packages?

If you build with virtualenv --system-site-packages ENV, your virtual environment will inherit packages from /usr/lib/python2. 7/site-packages (or wherever your global site-packages directory is). This can be used if you have control over the global site-packages directory, and you want to depend on the packages there.

How do I run a Python script in a virtual environment?

To use the virtual environment you created to run Python scripts, simply invoke Python from the command line in the context where you activated it. For instance, to run a script, just run python myscript.py .


1 Answers

Use the --gae-lib-root option as in

$ nosetests --with-gae --gae-lib-root=/opt/my/google_appengine
like image 110
Greg Bacon Avatar answered Oct 22 '22 02:10

Greg Bacon