install.txt 3.1 KB

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