Wilcox Development Solutions Blog

Turbogearn 2.1: installation, for the impatient, using virtualenv and pip

May 22, 2010

I’m playing with Turbogears 2 more and more, and as part of this process I wanted to improve and codify my process for getting a new TG2 app up and running.

I also really like virtualenv, and am learning to love pip (mostly for the ease of requirements.txt).

I also know that the Installation for the Impatient make me, well, impatient. Ughh, 5 commands.

So I wanted to see if I could make this slightly better with pip, and I kind of did:

$ pip install -E tg2env -i http://www.turbogears.org/2.1/downloads/current/index/tg.devtools $ source tg2env/bin/activate $ paster quickstart my_wonderful_app

Two issues I found when trying to install TG2:

  • You want tg.devtools, not Turbogears2: tg.devtools includes the tools to make new projects, where as the Turbogears package just includes the code to run a Turbogears app.
  • Ultimately leaving out the -i part should work, but I ran into problems that way (had version conflicts with repoze.who), so ended up having to specify the package source with -i. It could be that these are solved by the time you read this.

or, to install the latest beta (at this point, 2.1b2)

$ pip install -E tg2env\ -e 'hg+http://bitbucket.org/turbogears/tg-dev/@2.1b2#egg=TurboGears2'\ -e 'hg+http://bitbucket.org/turbogears/tgdevtools-dev/@2.1b2#egg=tg.devtools'

Ok, it’s still a lot of commands, but it can be done.

Hope this helps enable great Turbogears apps!