Environment

Prerequisite

Python 2.6 or higher. Earlier versions of TurboGears were not compliant with Python 3.X. Latest version claims to work well on Python 3.X. However, official documentation of TurboGears is still based on Python 2.7 environment.

The following command installs virtualenv −pip install virtualenv

This command needs administrator privileges. Add sudo before pip on Linux/Mac OS. If you are on Windows, log in as Administrator. On Ubuntu virtualenv may be installed using its package manager.Sudo apt-get install virtualenv

Once installed, the new virtual environment is created in a folder.mkdir newproj cd newproj virtualenv venv

To activate corresponding environment, on Linux/OS Xvenv/bin/activate

on Windows

venv\scripts\activate

We are now ready to install TurboGears in this environment. A minimal installation of TurboGears is done by following command −

pip install TurboGears2

The above command can be run directly without virtual environment for system wide installation.

To install TurboGears along with development tools, use following command −

pip install tg.devtools

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *