Python Pip安装错误与:flask-mysqldb [英] Python Pip install error with: flask-mysqldb
问题描述
我在Windows 10(X64bit)PC上使用Python 3.5+.我试图用pip安装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
但是它显示了一个错误
找不到vcvarsall.bat
Unable to find vcvarsall.bat
然后我安装了此软件,然后重试,但显示相同的问题.
Then i installed this software and try again but show me same problem.
带有sp1的Visual c ++ 2008速成版
visual c++ 2008 express edition with sp1
我也检查了stackoverflow中的其他解决方案,但无法解决该问题.
Also i checked other solution in stackoverflow,but cant fix that problem.
推荐答案
我看到您正在使用python 3.x.
I saw that you are using python 3.x.
我认为问题出在某些注册表设置上,因为您遇到了Visual Studio问题.
I think the problem is of some registry settings as you are getting Visual studio problems.
以下是解决方法步骤:
- 重新安装python.这将设置丢失的注册表.
-
然后运行以下命令
- Reinstall python. This will set the missing registry.
Then run the below command
pip install mysqlclient
MySQLdb 不支持Python 3,但它不是唯一的Python MySQL驱动程序.您可以使用上述命令安装mysql client
.
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.
这篇关于Python Pip安装错误与:flask-mysqldb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!