Python installs Django via pip

  • 2020-05-30 20:31:44
  • OfStack

Python installs Django via pip

After learning the previous Python package management tool, we will configure the development and operation environment of Django based on the previous knowledge.

The first is to install Django (via pip) :


pip install Django

The output result in my case looks like this:


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 755
Successfully installed Django
Cleaning up...

Verify 1 whether Django was successfully installed:


[root@nowamagic ~]# python2.7
Python 2.7.5 (default, Sep 2 2013, 15:56:04)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>>

import is successful, that is, Django has been installed successfully.

Now if you go to /usr/local/bin/, you can also see the corresponding django-admin.py, so you can create projects using django-admin.py.

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: