Proper way to parse requirements file after pip upgrade to pip 10.x.x?

前端 未结 5 1559
-上瘾入骨i
-上瘾入骨i 2020-12-16 17:17

So today I did found out that with the release of pip 10.x.x the req package changed its directory and can now be found under pip._internal.r

5条回答
  •  再見小時候
    2020-12-16 17:59

    with open("requirements.txt") as f:
        dependencies = [line for line in f if "==" in line]
    
    setup(
        install_requires=dependencies
    )
    

提交回复
热议问题