由于是以前的项目,所以使用旧低的版本来使用的。Python2.7.5,在安装模块时,有以下提示:怎么办?DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as
Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More
details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-
process/#python-2-support pip 21.0 will remove support for this functionality.
因为自己平时使用MySQL比较多,所以经常需要使用PyMySQL。低版本不支持,难道我们必须把2.7的代码都改写到3+么?代码改写成本太高,所以就需要想其它的发自来安装模块了。那应该怎么安装呢?不能pip,只能自己源码编译了。。https://pypi.tuna.tsinghua.edu.cn/simple/PyMySQL/
此地址全部是PyMySQL的包,可以根据自己的版本选择对用的版本,我的版本是2.7.5所以选择了PyMySQL-0.9.3.tar.gz的源码包来安装。具体的安装命令我就不介绍了,常规安装 build,install即可。
版本简单说明:
PyMySQL-0.9.3-py2.py3-none-any.whl //py2.py3 就是2和3都支持
PyMySQL-1.0.0-py3-none-any.whl // 只支持py3
e5d9183cc0a775ac29f9e0365cca6556 PyMySQL-0.9.3.tar.gz
PyMySQL-0.9.3.tar.gz本地下载