Where is my Django installation?

$ python
>>> import django
>>> django.__file__
'/usr/local/lib/python2.7/site-packages/django/__init__.pyc'

The current top answer doesn't work, at least on linux.

From the Django tutorial:

If you have difficulty finding where the Django source files are located on your system, run the following command:

python -c "
import sys
sys.path = sys.path[1:]
import django
print(django.__path__)"

On Microsft-Windows OS: In the Lib/site-packages folder inside your python installation.


in the CLI you can do this:

>>> import django
>>> django
<module 'django' from '/usr/local/lib/python2.6/dist-packages/django/__init__.pyc'>