DEV Community

Serhat Teker
Serhat Teker

Posted on • Originally published at tech.serhatteker.com on

How to Check Django Version

You can use one of the below methods to check which version of Django you
installed:

  1. Using python bin:

    $ python -m django --version
    3.0.5
    
  2. Using pip freeze:

    $ pip freeze
    asgiref==3.2.7
    Django==3.0.5
    pytz==2020.1
    sqlparse==0.3.1
    

    This method gives you all python packages that you installed. To see only Django:

    $ pip freeze | grep Django
    Django==3.0.5
    
  3. Using pip show:

    $ pip show django
    Name: Django
    Version: 3.0.5
    Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
    Home-page: https://www.djangoproject.com/
    Author: Django Software Foundation
    Author-email: foundation@djangoproject.com
    License: BSD
    Location: /home/serhat/tmp/django/.venv/lib/python3.8/site-packages
    Requires: pytz, asgiref, sqlparse
    Required-by:
    
  4. Using django module itself:

    Open a python console:

    (.venv)  user@host $ python
    Python 3.8.1 (default, Feb 12 2020, 16:30:11)
    [GCC 7.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    

    then type:

    >>> import django
    >>> django.VERSION
    (3, 0, 5, 'final', 0)
    

All done!

Top comments (0)