3 ms·
Well, sometimes you need an architect rather than a committee. This is one such time. Looking at the whole thing superficially (i.e. just throwing something at
by m_mueller 10y ago
Well, sometimes you need an architect rather than a committee. This is one such time.
Looking at the whole thing superficially (i.e. just throwing something at the wall here), this is how I'd have done it:
* packages are by default always installed in user space.
* package manager is built into import system. Importing a package that's not in the user's environment yet will lead to something like pip install at script startup.
* import statements understand versions. By default the latest version of a package is loaded. If something else is needed, the programmer can specify the specific one.
* for most third party packages that are publicised in pypy it's recommended to bind all imports to specific versions of dependencies, so it can be tested in this configuration at release.
- devnonymous 10y ago> package manager is built into import system. > Importing a package that's not in the user's > environment yet will lead to something like > pip install at script startup Here's a nifty little recipe I came up with to do just this by exploiting the import hooks introduced in py3.4 http://lonetwin.github.io/blog/html/2016/05/16/auto_install_missing_python_modules.html
- maweki 10y agoPlease don't do that. Provide a requirements-file with the appropriate dependencies and their versions to use with `pip install -r `