TurboGears Installation on Windows

Status: Official

Getting Python

If you're new to Python, welcome. It's a great language

  1. Grab the Python 2.5 Installer.
  2. Run the installer.
  3. Add Python to your path.

    To do this, go to System Properties -> Advanced -> Environment Variables and add or edit the PATH variable to have ;C:\Python25;C:\Python25\Scripts, assuming you installed Python to the default location.

Note: The recommended Python version to use with TurboGears currently is 2.5.x, but we still support Python 2.4.x and (with some restrictions) Python 2.3.x. Python 2.5.x is supported from TurboGears version 1.0.2 onwards.

Installing TurboGears

You can run Python from any shell if your Python scripts directory is on your path. By default the scripts directory is C:Python25Scripts

  1. Open up a command line prompt (Start -> Run and type cmd)
  2. Download tgsetup.py and run
python tgsetup.py
  1. Make sure your installation succeeded by running tg-admin info.

Once you've gotten TurboGears and a database driver installed, jump over to the 20 minute wiki tutorial or the getting started guide to get your feet wet.

Also consider signing up for the discussion or announcement mailing list. We're always happy to help people work through their problems and you might have something to share with us. There's also an irc channel, #turbogears on irc.freenode.net.

Database Drivers

If you're just doing development on your desktop, you can use pysqlite. You can get the latest version from the pysqlite download page.

Warningg: easy_install pysqlite does not work currently for all versions of Python. Use the binary installer for your Python version from the pysqlite page instead.

If you're doing this on a production server, you'll probably want to use MySQL (using the MySQLdb driver) or Postgres (using the psycopg2 driver), though you could use several other databases if you like.

Get Help

For the most part, installation goes off without a hitch, but if you have problems, feel free to ask for help.


The comment feature has been disabled on this page due to heavy spamming. If you want to comment on the contents of this page, if you have questions, or want to report an error, please write to the TurboGears mailing list.

Past comments:

FredLin
2006-12-16 00:19:48

you have to close then reopen the command tool after you add Python to your path. Is it the cure for you?

localhost
2007-01-17 22:12:58

If you need to go through a proxy, simply define an environment variable http_proxy. In windows, this is "set http_proxy=http://192.168.1.200:3128" In linux, this is "export http_proxy=http://192.168.1.200:3128"

localhost
2007-01-31 09:16:36

Because of pysqlite compile-problems on typical windows-boxes during the "out-of-the-box"-TG-installation, I recommend installing TG with "easy_install --upgrade TurboGears==1.0.1" (at least if your previous try with tgsetup.py for v1.0.1 failed).
Furthermore I had to "easy_install SQLObject" to get "tg-admin info" work.

localhost
2007-03-20 10:22:30

and http_proxy=http://user:passwd@proxy:port if using a proxy with authentification...

1.0/InstallWindows (last edited 2008-05-13 14:38:27 by ChristopherArndt)