Downloading and Installing TurboGears

Status: Official
Please don't post questions about installation problems as comments on this page. Instead, write to the mailing list where more people can help you. When you have found the solution, you file a ticket or ask an Editor to add it to this page. See also the installation troubleshooting page.

Quickstart Instructions

Installing TurboGears latest stable version from scratch is most easily achieved with the tgsetup.py script.

Installing the latest beta version can be done in the same way by using the tgsetup-betaversion.py script.

The Standard Way (tgsetup.py)

There are only two steps necessary to install TurboGears, if you already have Python installed. If you don't have Python installed on your system (or are not sure about it), please refer to the detailed installation instructions in the next section.

  1. Download the tgsetup.py script.
  2. Run the script from the command-line:

    $ python tgsetup.py

We suggest that you refer to the system-specific installation instructions for details.

Requirements

  • Windows, Mac OS X 10.3/4 or Linux/Unix
  • Python >= 2.3.x (Of course. Details see below)
  • An internet connection (for off-line installation see below)
  • About 20-25 MB of disk space, depending on your OS, architecture and filesystem
  • On some systems you need a C compiler, to compile Python C-extensions from some components that are required by TurboGears. See the detailed instructions for your platform for details.
  • If you need to compile extensions, you'll also need Python header files and libraries. If they are not included in your Python installation, they can usually be installed with a package called python-dev, python-devel or similar.
  • (Recommended) A database system (see below)
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.

Database Installation and Configuration

TurboGears is designed to work in conjunction with an object-relational mapper such as SQLObject or SQLAlchemy, so TurboGears can use all the databases supported by these ORMs. If you have one of the supported DBAPI implementations in Database Options, you should be settled.

If you need to choose a database option, SQLite is an easy-to-use database to get started with, which works with plain files or in-memory databases. If you are using Python 2.5, SQLite is supported out of the box and you don't need to install pysqlite.

Here we list installation and configuration instructions for the most common databases:

Where Are the Download Files?

Generally, downloads are done through the easy_install-based tgsetup.py script. There is a list of files available if you need to do something manually.

Specific Version Installation

Installing an older version of TurboGears is always possible since we keep all our files online. After installing TurboGears you probably also want to install at least one of the object-relational mappers, SQLObject or SQLAlchemy. To install a specific version of TurboGears run a command line similar to this one:

$ easy_install -f http://files.turbogears.org/ "TurboGears==1.x.y"

Replace 1.x.y with the number of the version of TurboGears, which you want to install. This form requires setuptools to be present on your machine. If you don't have setuptools yet, download and run ez_setup.py to install it:

$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ python ez_setup.py

You can now issue the easy_install command to install SQLObject or SQLAlchemy:

$ easy_install SQLAlchemy

or:

$ easy_install SQLObject

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:

localhost
2007-07-20 01:40:00

easy_install-based is not easy when you don't have connection available.
I don't have machine connected to the net, I usually connect to the net
from public places such as internet cafe. Downloading the files one-by-one
is not as easy as typing www.djangoproject.com or www.rubyonrails.org.
However, I really want a copy of TG in a big-fat tarball even if it weighs
a lot megabytes.


ChristopherArndt
2007-07-20 03:38:17

@localhost 2007-07-20 01:40:00 Please see page 1.0/OfflineInstall and my last
comment on that page for an explanation why we do not support this at the moment.


LukaszSzybalski
2007-08-16 11:47:58

What is the current version of TG?
What version of sqlalchemy does it work with?
Can we include this information on the website?


ChristopherArndt
2007-08-18 05:05:12

The current version is displayed on the TurboGears homepage at http://turbogears.org/.
All of its third-party requirements are laid down in its setup.py file. You can look
it up in the SVN browser on the trac site:

http://trac.turbogears.org/browser/branches/1.0/setup.py


LukaszSzybalski
2007-10-05 09:40:36

Actually it is better to use your system package. For Debian
apt-get update
apt-get install python-turbogears
apt-get install sqlite
apt-get install python-sqlite

http://tinyurl.com/2uk3dd
I found that windows installation gets broken when you install an update without corresponding
packages(sqlalchemy for example) Then you need to deprecate your packages and it is then when
you need to know which version sub packages you need.(fastdatagrid)


localhost
2007-10-10 00:00:06

Oh, After I install simplejson manually everything is ok now.
But the problem is.... if somebody encounter this problem, may give up easily
(I just want to choose other framework if I could not solve this problem).
Because he even can't download and install it. I suggest that you could provide
some file that contain all packages. Or some installer that contain all packages
and install them up.

1.0/Install (last edited 2008-03-13 11:52:54 by ChristopherArndt)