泻药~~首先 pip 还没有完全放弃对 python2 的支持,可以看一下官方的说明:pip will continue to ensure that it runs on Python 2.7 after the CPython 2.7 EOL date. Support for Python 2.7 will be dropped, if bugs in Python 2.7 itself make this necessary (which is unlikely) or Python 2 usage reduces to a level where pip maintainers feel it is OK to drop support. The same approach is used to determine when to drop support for other Python versions.
However, bugs reported with pip which only occur on Python 2.7 would likely not be addressed directly by pip’s maintainers. Pull Requests to fix Python 2.7 only bugs will be considered, and merged (subject to normal review processes). Note that there may be delays due to the lack of developer resources for reviewing such pull requests.
大体意思就是会对 py2.7 及其之后对版本支持,直到 py2 使用减少到 pip 维护者不需要维护的时候就会移除 py2 支持。所以短时间不用担心这个问题。
如果真的不再支持 py2, 那么再安装 py2 的库话,就需要我们先把相应的库源码下载下来,然后使用 pythonsetup.pyinstall 去安装了
最后宣传一下,我刚建的一个 python 新手交流群:学 Python 的桃子 欢迎来耍