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