Install Django

Linux

The latest version is recommended, Django : 1.4

  • Simply follow the instructions on the download page of the Django website:
  • Verify installation and version of Django.

Verify installation and version of Django

  • In a console, launch the Python interpretor:
    $ python
    
  • Then, try to import Django:
    >>> import django
    
  • If there's no error message, Django is installed.
    Verify the installed version:
    >>> django.get_version()
    
  • You should have this output:
    '1.4'
    

Mac

The latest version is recommended, Django : 1.4

  • Simply follow the instructions on the download page of the Django website:
  • Verify installation and version of Django.

Verify installation and version of Django

  • In a console, launch the Python interpretor:
    $ python
    
  • Then, try to import Django:
    >>> import django
    
  • If there's no error message, Django is installed.
    Verify the installed version:
    >>> django.get_version()
    
  • You should have this output:
    '1.4'
    

Windows

Installation tested on Windows XP.

The latest version is recommended, Django : 1.4

Installation of Django on Windows : step by step

Read this section if you encountered problems when following the official procedure.

  • Download the sources : Django-1.4.tar.gz
    • you can download it wherever you want... on the Desktop, for instance
  • Extract the downloaded file to obtain this directory : Django-1.4
    • you can extract it wherever you want... on the Desktop, for instance
    • to extract a tar.gz archive, you can download bsdtar, a command-line tool...
    • ... or use a graphic tool such as 7-zip.
    • if you're blocked at this step, arrive earlier at the workshop, MontrĂ©al-Python team will give you the sources on a USB key
  • Install Django from the sources
    • Launch the Python interpretor (Windows XP path):
      Start > Programs > Python 2.7 > Python (command line)
    • Run the Django installation file:
      >>> setup.py install
      

      The setup.py file to be run with Python is directly in the Django-1.4 directory
      ... be sure that your command-line console is in this directory
      cd Django-1.4
      or give the full path to this file
  • Verify installation and version of Django

Verify installation and version of Django

  • Launch the Python interpretor (Windows XP path):
    Start > Programs > Python 2.7 > Python (command line)
  • Then, try to import Django:
    >>> import django
    
  • If there's no error message, Django is installed.
    Verify the installed version:
    >>> django.get_version()
    
  • You should have this output:
    '1.4'
    
    ---