方法一、利用命令来安装

安装:python37 -m pip install pymysql

升级:python37 -m pip install pymysql --upgrade pip

方法二、通过python官网,下载pymysql安装。