美文网首页
Windows下python安装requirements.txt

Windows下python安装requirements.txt

作者: mutang | 来源:发表于2020-12-13 23:45 被阅读0次
from pip._internal import main as pip_main

def install(package):
    pip_main(['install', package])

if __name__ == '__main__':
    with open('requirements.txt') as f:
        for line in f:
            install(line)

Windows只能写个脚本来实现了,谁有更好的方法告诉我一下

相关文章

网友评论

      本文标题:Windows下python安装requirements.txt

      本文链接:https://www.haomeiwen.com/subject/kpemgktx.html