Note that there are some explanatory texts on larger screens.

plurals
  1. POCan we shed some definitive light on how python packaging and import works?
    primarykey
    data
    text
    <p>I had my fair chance of getting through the python management of modules, and every time is a challenge: packaging is not what people do every day, and it becomes a burden to learn, and a burden to remember, even when you actually do it, since this happens normally once.</p> <p>I would like to collect here the definitive overview of how import, package management and distribution works in python, so that this question becomes the definitive explanation for all the magic that happens under the hood. Although I understand the broad level of the question, these things are so intertwined that any focused answer will not solve the main problem: understand how all works, what is outdated, what is current, what are just alternatives for the same task, what are the quirks.</p> <p>The list of keywords to refer to is the following, but this is just a sample out of the bunch. There's a lot more and you are welcome to add additional details. </p> <ul> <li>PyPI</li> <li>setuptools / Distribute</li> <li>distutils</li> <li>eggs</li> <li>egg-link</li> <li>pip</li> <li>zipimport</li> <li>site.py </li> <li>site-packages</li> <li>.pth files</li> <li>virtualenv</li> <li>handling of compiled modules in eggs (with and without installation via easy_install)</li> <li>use of get_data()</li> <li>pypm</li> <li><a href="http://cournape.github.com/Bento/">bento</a></li> <li><a href="http://www.python.org/dev/peps/pep-0376/">PEP 376</a></li> <li>the cheese shop</li> <li>eggsecutable</li> </ul> <p>Linking to other answers is probably a good idea. As I said, this question is for the high-level overview.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload