在Python中自动下载所需模块的最简单方法? [英] Easiest way to automatically download required modules in Python?

查看:428
本文介绍了在Python中自动下载所需模块的最简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布我编写的python模块,该模块取决于多个软件包.最简单的方法是什么,以便以编程方式下载这些软件包,以防万一它们在正在运行的系统上不可用?这些模块中的大多数应该可以通过easy_install或pip或类似的方式获得.我只是想避免让用户单独安装每个模块.

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 packages 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.

谢谢.

推荐答案

pip 使用<一个href ="https://pip.readthedocs.org/en/latest/user_guide/#requirements-files" rel ="noreferrer">需求文件,其中包含有关Python打包工具的更多建议,请参阅Python Packaging Authority的最新(PyPA).

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

这篇关于在Python中自动下载所需模块的最简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆