[issue38623] Python documentation should mention how to find site-packages

Peter Bittner report at bugs.python.org
Tue Jan 7 18:18:32 EST 2020


Peter Bittner <peter.bittner at gmx.net> added the comment:

Python learners deserve to know about "site-packages" and (optionally) "dist-packages". This is a "random note", it's an explanation that is missing in the tutorial.

- Site-packages "is the target directory of manually built Python packages", does someone explain.[4]

- It is the "expected convention for locally installed packages", explains Greg Ward in "Installing Python Modules".[5]

- Their location is only a subset of `sys.path`, as visible from the Python code in the `site` module.[6]

The tutorial currently mentions its special role only briefly [7], saying:

> * The installation-dependent default.

We should explain that part. I'll give it a shot replacing my earlier proposal.


[4] https://stackoverflow.com/questions/31384639/what-is-pythons-site-packages-directory
[5] https://docs.python.org/3.8/install/#modifying-python-s-search-path
[6] https://github.com/python/cpython/blob/master/Lib/site.py#L319-L344
[7] https://docs.python.org/3.8/tutorial/modules.html?highlight=installation-dependent%20default#the-module-search-path

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38623>
_______________________________________


More information about the Python-bugs-list mailing list