
On 19 September 2016 at 17:59, Joonas Liik <liik.joonas@gmail.com> wrote:
using pip from within python is not that difficult already. as can be seen with a glance to: http://stackoverflow.com/questions/12332975/installing-python-module-within-...
Note that pip does not officially support any use of its internal API - it is purely a command line tool, and should only be invoked as a subprocess. Having said that, simple use of pip's internal API isn't difficult and if you keep to the higher-level APIs, things *shouldn't* break (but if they do, you get to keep both pieces :-)). For the use case of running simple scripts with dependencies, rwt (https://pypi.python.org/pypi/rwt) might be a reasonable solution. You can declare your dependencies in your script, then run it with rwt which will install those dependencies to a temporary location, then run the script with those dependencies active, and then tidy up afterwards. Paul