一个简单的inscript多包安装程序
dependency-fixer的Python项目详细描述
家属固定器
python依赖修正器和可导入脚本函数
这个python脚本可以作为一个独立的python模块安装程序工作,并且可以通过从dependencyfixer将fix函数导入到程序中来在程序运行时安装模块。在
uses
pip._internal.cli.main.main()
function to install
#使用此软件包的优点
- 独立安装脚本
- 可以同时安装多个模块
- 提供要安装的脚本数量的报告(尝试失败)
#安装
pip install dependency-fixer
#用法
❖Direct: *(If are using source clone)
run dependencyfixer.py and follow instruction
❖Importing to other python scripts
- Import it like :
from dependencyfixer import fix
- Function and Arguements:
- Function:
fix(dep,auto=True,instantkill=False)
- Arguements:
- Mandatory:
dep
( List of all packages to be installed or checked )- Optional: ➤
instantkill
( If setTrue
then stops any futher execution of script in which function is used ) ( False by default ) ➤auto
( If setFalse
then asks for user's consent to install packages, if user refuses, then return result=0 ) ( True by default ) ➤verbose
( If setTrue
then prints details in console during installation and after installation ) ( False by default )
- 示例:
dep=['pillow','jupyter']
result,leftdep=fix(dep)
- This function returns 2 values :
- leftdependencies : (list of packages that couldn't be installed)
- result {1,0,-1} | 1 | : All modules installed | 0 | : No modules installed | -1 | : Some modules can not be installed
- 项目
标签: