Python: pip
How to install Django using pip in Python
After learning the Python package management tool, we will configure the development and running environment of Django based on the previous knowledge.
First, install Django (via pip ):
pip install Django
The output result is as follows:
Downloading/unpacking Django Downloading Django-1.5.2.tar.gz (8.0MB): 8.0MB downloaded Running setup.py egg_info for package Django warning: no previously-included files matching '__pycache__' found under directory '*' warning: no previously-included files matching '*.py[co]' found under directory '*'Installing collected packages: Django Running setup.py install for Django changing mode of build/scripts-2.7/django-admin.py from 644 to 755 warning: no previously-included files matching '__pycache__' found under directory '*' warning: no previously-included files matching '*.py[co]' found under directory '*' changing mode of /usr/local/bin/django-admin.py to 755Successfully installed DjangoCleaning up...
Verify that Django is successfully installed:
[root@nowamagic ~]# python2.7Python 2.7.5 (default, Sep 2 2013, 15:56:04)[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import django>>>
The import is successful, that is, Django has been installed successfully.
Now you go to/usr/local/bin/, you can also see the corresponding django-admin.py, so you can use the django-admin.py to create a project.
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!