开发者

Easiest way to automatically download required modules in Python?

开发者 https://www.devze.com 2022-12-26 14:13 出处:网络
I would like to release a python module I wrote which depends on several packages. What\'s the easiest way to make it so these pa开发者_如何学Gockages are programmatically downloaded just in case they

I would like to release a python module I wrote which depends on several packages. What's the easiest way to make it so these pa开发者_如何学Gockages are programmatically downloaded just in case they are not available on the system that's being run? Most of these modules should be available by easy_install or pip or something like that. I simply want to avoid having the user install each module separately.

thanks.


pip uses requirements files, which have a very straightforward format.

For more Python packaging tooling recommendations, see the latest from the Python Packaging Authority (PyPA).


See the setuptools docs on how to declare your dependencies -- this will allow easy_install to find, download and install all of them (and transitive closure thereof) if everything's available in PyPi, or otherwise if you specify the dependencies' URLs.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号