安装 终止pip_在2020年Python 2生命终止后,我是否仍然能够通过Pip安装依赖项软件包?...

I'm using Python 2.7 and python pip to download all dependency packages from requirements.txt file for running my project. As we know the end of life of Python 2 in 2020, I have concern I could not install my dependency package from pip as pip install -r requirements.txt anymore.

One way I could think of is download all dependencies from requirements.txt and install them locally. Is it possible?

I have read a similar question Will PIP work for python 2.7 after its End of Life on 1st Jan 2020, but the possibility is still not clear for me whether or not pip still be working or not after 2020 EOL of Python 2.

How could I confirm that? How could I do to keep dependencies still be installed via pip in 2020 end of life of python 2? Thanks

解决方案

As seen in the question you linked, the pip maintainers are willing to support Python 2.7 for as long as reasonably feasible. Now you need to consider the other side: the index.

The default index for pip is PyPI, and I can't imagine that they would decide to delete existing artifacts or stop serving them just because the corresponding interpreter reached their end of life. I am pretty sure they already host and serve artifacts that are aimed at Python interpreters that have already reached their end of life. See for example the artifacts for lxml version 3.4.4 clearly show that it is still serving files aimed at Python 2.6 and 3.4, both of them have alredy reached EOL.

One way I could think of is download all dependencies from requirements.txt and install them locally. Is it possible?

This is definitely feasible as well. You could even go a step further and host your own index. See the following links for ideas:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值