TurboGears on Dreamhost

I have been reading comparisons about TurboGears and Django and the other Python web frameworks. There doesn’t seem to be a clear winner in the documents I’ve read, but there are quite a few comparisons I have yet to read. But my initial impression is that with Django you can get an application up quickly, while TG would give you more power to tweak things. And that TG reuses 3rd party packages, while Django project creates similar packages for itself. This latter point made me start my experimentation with TG, although that commentary was from 2006 so maybe things have changed.

I read the documentation on how to set up TurboGears on Dreamhost, and it all seems dated and overly complicated. I plan on updating those instructions, but here’s what I did to get the Wiki20 sample running:


mkdir -p ~/bin
mkdir -p ~/python2.4/site-packages

cat >>.bash_profile
alias python=python2.4
export PYTHONPATH=/home/<username>/python2.4/site-packages
export PATH=/home/<username>/bin

source .bash_profile

wget http://www.turbogears.org/download/tgsetup.py
python tgsetup.py –install-dir=/home/<username>/python2.4/site-packages –script-dir=/home/<username>/bin

cd my.domain.name
tg-admin quickstart

mv Wiki-20/* .

# edit .htaccess
# edit dev.cfg

python start-wiki20.py

#at this point I run into the following error:
You are required to install SQLObject but appear not to have done so.
Please run your projects setup.py or run `easy_install SQLObject`.
#end error

easy_install –install-dir=/home/<username>/python2.4/site-packages –script-dir=/home/<username>/bin “SQLObject>=0.7.1dev-r1860,<=0.7.99”

python start-wiki20.py

#at this point it complained the port was taken, so I experimented until it found an unused port
#browsed over to my.domain.name which showed the app running
# but alas! it died immediately after serving that one page:
2008-01-31 21:14:00,909 cherrypy.msg INFO ENGINE: SystemExit raised: shutting down autoreloader
2008-01-31 21:14:00,910 cherrypy.msg INFO HTTP: HTTP Server shut down
2008-01-31 21:14:00,914 cherrypy.msg INFO ENGINE: CherryPy shut down

Update: TG seems to actually go down soon after start, regardless of whether it serves any pages or not.

Update 2: See my second attempt at just using Python on Dreamhost, followed by the final bits for working Pylons on Dreamhost.

Similar Posts:

    None Found