install.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. Quick install guide
  2. ===================
  3. Before you can use Django, you'll need to get it installed. We have a
  4. :doc:`complete installation guide </topics/install>` that covers all the
  5. possibilities; this guide will guide you to a simple, minimal installation
  6. that'll work while you walk through the introduction.
  7. Install Python
  8. --------------
  9. Being a Python Web framework, Django requires Python. It works with any Python
  10. version from 2.6 to 2.7 (due to backwards incompatibilities in Python 3.0,
  11. Django does not currently work with Python 3.0; see :doc:`the Django FAQ
  12. </faq/install>` for more information on supported Python versions and the 3.0
  13. transition), these versions of Python include a lightweight database called
  14. SQLite_ so you won't need to set up a database just yet.
  15. .. _sqlite: http://sqlite.org/
  16. Get Python at http://www.python.org. If you're running Linux or Mac OS X, you
  17. probably already have it installed.
  18. .. admonition:: Django on Jython
  19. If you use Jython_ (a Python implementation for the Java platform), you'll
  20. need to follow a few additional steps. See :doc:`/howto/jython` for details.
  21. .. _jython: http://www.jython.org/
  22. You can verify that Python is installed by typing ``python`` from your shell;
  23. you should see something like::
  24. Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
  25. [GCC 4.4.5] on linux2
  26. Type "help", "copyright", "credits" or "license" for more information.
  27. >>>
  28. Set up a database
  29. -----------------
  30. This step is only necessary if you'd like to work with a "large" database engine
  31. like PostgreSQL, MySQL, or Oracle. To install such a database, consult the
  32. :ref:`database installation information <database-installation>`.
  33. Remove any old versions of Django
  34. ---------------------------------
  35. If you are upgrading your installation of Django from a previous version, you
  36. will need to :ref:`uninstall the old Django version before installing the new
  37. version <removing-old-versions-of-django>`.
  38. Install Django
  39. --------------
  40. You've got three easy options to install Django:
  41. * Install a version of Django :doc:`provided by your operating system
  42. distribution </misc/distributions>`. This is the quickest option for those
  43. who have operating systems that distribute Django.
  44. * :ref:`Install an official release <installing-official-release>`. This
  45. is the best approach for users who want a stable version number and aren't
  46. concerned about running a slightly older version of Django.
  47. * :ref:`Install the latest development version
  48. <installing-development-version>`. This is best for users who want the
  49. latest-and-greatest features and aren't afraid of running brand-new code.
  50. .. admonition:: Always refer to the documentation that corresponds to the
  51. version of Django you're using!
  52. If you do either of the first two steps, keep an eye out for parts of the
  53. documentation marked **new in development version**. That phrase flags
  54. features that are only available in development versions of Django, and
  55. they likely won't work with an official release.
  56. Verifying
  57. ---------
  58. To verify that Django can be seen by Python, type ``python`` from your shell.
  59. Then at the Python prompt, try to import Django::
  60. >>> import django
  61. >>> print(django.get_version())
  62. 1.4
  63. That's it!
  64. ----------
  65. That's it -- you can now :doc:`move onto the tutorial </intro/tutorial01>`.