Search notes:

Python installation root directory

Location of root directory

The location of the root directory can be determined with the following simple sequence of python statements:
>>> import sys
>>> sys.exec_prefix

Windows

The root of a Python installation on Windows is C:\Users\username\AppData\Local\Programs\Python\PythonVV if it was not installed for all users.
If it was installed for all users, the root directory is right below C:\ (!), for example C:\Python39.

Some subdirectories of the root directory

Some subdirectories that are found below Python's root directory include:
+───NEWS.txt                            documents what's new, improved, fixed etc. for a Python version
+───python (executable):               (Windows: python.exe): the interpreter-executable.
├───DLLs
├───Doc
│   ├───pythonVVV.chm
├───include
│   ├───cpython
│   └───internal
├───Lib                                 Lib stores the standard library
│   ├───asyncio
│   ├───collections
│   ├───concurrent
│   │   ├───futures
│   ├───ctypes
│   │   ├───macholib
│   │   ├───test
│   ├───curses
│   ├───dbm
│   ├───distutils
│   │   ├───command
│   │   ├───tests
│   ├───email
│   ├───encodings
│   ├───ensurepip                       Bootstrapper for pip
│   ├───html
│   ├───http
│   ├───idlelib
│   ├───importlib
│   ├───json
│   ├───lib2to3
│   │   ├───fixes
│   │   ├───pgen2
│   │   ├───tests
│   │   │   ├───data
│   │   │   │   ├───fixers
│   │   │   │   │   ├───myfixes
│   ├───logging
│   ├───msilib
│   ├───multiprocessing
│   │   ├───dummy
│   ├───pydoc_data
│   ├───site-packages                  (3rd party modules)
│   │   ├───LIB-ONE
│   │   ├───LIB-TWO
│   │   ├───…
│   │   ├───LIB-n
│   ├───site.py
│   ├───sqlite3
│   │   ├───test
│   ├───test
│   ├───tkinter
│   │   ├───test
│   │   │   ├───test_tkinter
│   │   │   ├───test_ttk
│   ├───turtledemo
│   ├───unittest
│   │   ├───test
│   │   │   ├───testmock
│   ├───urllib
│   ├───venv
│   │   ├───scripts
│   │   │   ├───common
│   │   │   ├───nt
│   │   │   └───posix
│   ├───wsgiref
│   ├───xml
│   │   ├───dom
│   │   ├───etree
│   │   ├───parsers
│   │   ├───sax
│   ├───xmlrpc
├───libs
├───Scripts                             This directory is typically included in the PATH environment variable so that the scripts can be easily executed
├───tcl
└───Tools
    ├───demo
    ├───i18n
    ├───parser
    ├───pynche
    │   ├───X
    └───scripts

See also

(Strawberry-) Perl installation root directory

Index