Installing Django under Linux

Source: Internet
Author: User

Yum Installation method

The following installation is installed in the Centos Linux environment and if your Linux system is Ubuntu please use the Apt-get command.

The Linux environment already supports Python by default. You can enter the Python command at the terminal to see if it is already installed.

Python 2.7.3 (default,  1, 05:14:39) [GCC 4.6.3] on Linux2type ' help ', ' copyright ', ' credits ' or ' license ' for More information.>>>
Installing Setuptools

Command:

Yum Install Setuptools

Once you're done, you can install Django using the Easy_install command

Easy_install Django

We then enter the following code in the Python interpreter:

[[email protected] django]# Pythonpython 2.7.3 (default, May, 14:49:08) [GCC 4.8.0] on Linux2type ' help ', ' Copyrigh T "," credits "or" license "for more information.>>> import django>>> Django. VERSION (1, 6, 5, ' final ', 0) >>>

We can see that the Django version number is output, which indicates that the installation was successful.

Pip Command Installation method
Pip Install Django
Source Installation Method

Download Source Bundle: https://www.djangoproject.com/download/

Enter the following command and install:

Tar xzvf django-x.y.tar.gz    # unzip the download package CD django-x.y                 # into the Django directory python setup.py install       # execute the Install command

After successful installation, Django is located in the Site-packages directory of the Python installation directory.

Installing Django under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.