[issue38623] Python documentation should mention how to find site-packages
New submission from Peter Bittner
Change by Peter Bittner
Change by Cheryl Sabella
Vinay Keerthi
Inada Naoki
Change by Inada Naoki
Peter Bittner
Inada Naoki
There is a specific question this change attempts to answer: "Where is the module I imported located in the file system?"
So `print(the_module.__file__)` is better answer. (or `pip list -v` if the module is third party package installed via pip). `python -m site` doesn't tell you where the imported module came from.
[3] https://docs.python.org/3/library/site.html#site.getusersitepackages
After merging PR 17858, you can use :ref:`site-commandline` for cross reference.
----------
_______________________________________
Python tracker
Brett Cannon
Inada Naoki
Change by miss-islington
Change by miss-islington
miss-islington
miss-islington
Inada Naoki
Peter Bittner
* 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-d...
[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-dep...
----------
_______________________________________
Python tracker
Inada Naoki
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.
I don't think so. At there, the tutorial doesn't explain about even standard library. We shouldn't explain about it there.
It should be explained much later in the tutorial, or document other than the tutorial.
----------
_______________________________________
Python tracker
Brett Cannon
participants (6)
-
Brett Cannon
-
Cheryl Sabella
-
Inada Naoki
-
miss-islington
-
Peter Bittner
-
Vinay Keerthi