百度教程说安装

pip install mysqldb

这在我的电脑上安装失败:

Could not find a version that satisfies the requirement mysqldb (from versions
: )
No matching distribution found for mysqldb

所以应该:

pip install MySQL-python

报错:

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27

缺少vc的一个库,我们根据提示到这里下载一下,然后安装,再次执行命令 :pip install mysql-python

还是报错:

No such file or directory
    error: command '"C:\Users\年浩\AppData\Local\Programs\Common\Microsoft\Visua
l C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2