install.txt 3.2 KB

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