cmd 中运行 pip3 install PyMySQL或者采用gitgit clone https://github.com/PyMySQL/PyMySQL cd PyMySQL/ python3 setup.py install