auto installing dependencies with pip to run a python zip application ?

Paul Moore p.f.moore at gmail.com
Tue Sep 26 16:49:14 EDT 2017


On 26 September 2017 at 19:47, Irmen de Jong <irmen at nospam.xs4all.nl> wrote:
> Any thoughts on this? Is it a good idea or something horrible? Has
> someone attempted something like this before perhaps?

When I've done this, I've bundled my dependencies in with my zipapp.
Of course that's trickier if you have binary dependencies like pillow.

What you could do is pip install your binary dependencies into a
directory in $TEMP using --target, then add that directory to
sys.path. Probably easier than building a full virtualenv. Bundle pip
with your app if you can't assume your users will have pip available.

Paul



More information about the Python-list mailing list