安装 MySQL-python
由于我的电脑是win10,这里只列出基于win10的教程
windows 下的安装:
pip install mysqldb
哈哈,这个在我电脑上安装失败了,

我去查了一下,正确的应该是:[图片上传中...(1567308082965.png-30a763-1583714772897-0)]
pip install MySQL-python

[图片上传中...(1567308082965.png-3f3296-1583714766349-0)]
哇,还是报错了,我们来看一下报错信息:
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
提示已经很清楚了,我们上这个网站下载一下需要的这个软件:http://aka.ms/vcpython27

来吧,下完了。我们再来试一下:pip install MySQL-python
我们发现还是报错了。。。就大概是下图
l C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2
原因就是因为我们没有驱动:可以在下面网址下载一个驱动
http://www.jb51.net/softs/73369.html#download
啊 然后直接安装..
安装完了之后,我们最后! 再来试一遍
好了

网友评论