Home > Article > Backend Development > Django tests whether the installation is successful
After we install django, we should not rush to develop. We must first know whether our django is installed successfully. Note here: Some children's shoes report that the installation is unsuccessful. Most of the reasons are: permission issues, and the current user's permissions are insufficient. During the django installation process, files will be written in /usr/local/lib/, so before installation, make sure that the current user has permission to operate the lib directory. This ensures success.
Okay, let’s get down to business, let’s see if our django has been installed successfully. . .
1. Switch to any directory in Linux and enter the command:
shell# python
The displayed result is:
Python 2.7.2 (default, Jan 19 2012, 18:26:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
2. Then try to introduce the django module and enter the command:
>> > import django
There is no output and no error, indicating that the import should be successful
3. Check the version of django and enter the command:
>>>django.VERSION
Note: version is all in capital letters
Output results :
(1, 4, 3, 'final', 0)
means the final version of version 1.4.3
This also shows that the django we installed is successful!