Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Find Django Install Location in Linux

    How to Find Django Install Location in Linux

    By RahulApril 24, 20221 Min ReadUpdated:April 27, 2022

    Django is an open-source, high-level web framework written in Python programming. It follows the model–template–views architectural pattern for the development. The Django installation directory differs as per the installation methods.

    Advertisement

    In this small faq, you will learn, how to find the Django installation directory on a Linux system.

    Django Installation Directory

    Open a terminal and connect to the Python shell. If you are using Python virtual environment, make sure to activate the environment before connecting to the Python shell. Then type the following commands to find the Django installation directory.

    You see the results below when Django is installed under the Global libraries.

    1
    2
    3
    4
    >>> import django
    >>> print (django.__file__)
     
    /usr/local/lib/python3.10/site-packages/django/__init__.py

    When the Django is configured with Python virtual environment, Make sure to activate environment like source venv/bin/activate . Then run the same commands and view the results.

    1
    2
    3
    >>> import django
    >>> print (django.__file__)
    /var/apps/venv/lib/python3.10/site-packages/django/__init__.py

    Thanks, hope this tutorial answered your query. Feel free to comment with any queries.

    django Python
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Error: EACCES: permission denied, scandir (Resolved)

    How To Install Python 3.11 on Ubuntu 22.04 / 20.04

    How to Install Python 3.11 on Amazon Linux 2

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.