python使用pip安装mysqldb失败,Python Pip安装错误与:flask-mysqldb

I am using Python 3.5+ on Windows 10 (X64bit) PC. I was trying to install MySQLdb with pip .

Here in command

pip install flask-mysqldb

But it show me an error

Unable to find vcvarsall.bat

Then i installed this software and try again but show me same problem.

visual c++ 2008 express edition with sp1

Also i checked other solution in stackoverflow,but cant fix that problem.

解决方案

I saw that you are using python 3.x.

I think the problem is of some registry settings as you are getting Visual studio problems.

Here are the workaround steps:

Reinstall python. This will set the missing registry.

Then run the below command

pip install mysqlclient

Edited : MySQLdb does not support Python 3 but it is not the only MySQL driver for Python. You can install mysql client using above command.