3 ms·
> Number two is, in order to do package management, you have to create a fake python installation and bend PYTHONPATH. Well whatever the language or runtime, y
by Galanwe 5y ago
> Number two is, in order to do package management, you have to create a fake python installation and bend PYTHONPATH.
Well whatever the language or runtime, you need to tell it how to find its dependencies. Be it with a configuration file, environment variables or parameters.
Your statement is not exactly correct either. You don't need a fake installation _and_ bend PYTHONPATH.
Virtualenv leverages the fact that "../lib/python<version>/site-packages/" relative to the interpreter is a default import path (default value of PYTHONHOME). It doesn't use PYTHONPATH.
> Why couldn't the import system resolve versions, too?
Not sure that would be really great. I prefer to have my dependencies all grouped together in a setup.py rather than scattered in various files at import time.