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

前端 未结 5 1563
-上瘾入骨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 18:16

    What I figured out the right way to do is adding the dependencies in the setup.py like:

    REQUIRED_PACKAGES = [
        'boto3==1.7.33'
    ]
    
    if __name__ == '__main__':
        setup(
            ...
            install_requires=REQUIRED_PACKAGES,
            ...
        )
    

    and just have a . in your requirements.txt. It will then automatically install all packages from the setup.py if you install from the file.

提交回复
热议问题