Python MySQLdb“错误:需要Microsoft Visual C ++ 14.0"即使已安装 [英] Python MySQLdb "error: Microsoft Visual C++ 14.0 is required" even though it has been installed

查看:111
本文介绍了Python MySQLdb“错误:需要Microsoft Visual C ++ 14.0"即使已安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到MySql数据库并将其数据用于某些代码,尽管在使用时

I'm attempting to connect to a MySql database and use its data for some code, though when I'm using

pip install mysqlclient

它给了我一个错误说明:

it gives me an error stating:

错误:需要Microsoft Visual C ++ 14.0. Visual C ++生成工具": http://landinghub.visualstudio.com/visual-cpp-build-tools"

"error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools"

提供的此链接不起作用,尽管我找到了正确的链接并安装了构建工具以及其他文章指定的"Windows 10 SDK". 可悲的是我仍然遇到这个错误.

This link provided does not work, though i found out the correct link and installed the build tools as well as the "Windows 10 SDK" as other posts have specified. I sadly still am getting this error.

有人知道怎么了吗? 谢谢!

Anyone know what is wrong? Thanks!

推荐答案

我相信如果您需要MySQL数据库,则可以通过其他方式安装它,例如,请参见Microsoft网页以获取详细信息(

I believe if you need MySQL database, this is installed by other means i.e. see Microsoft webpage for details (https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html).

如果您只想从Python连接到MySQL数据库,请尝试安装mysql-connector.

If you just want to connect to MySQL database from Python, try installing mysql-connector instead.

pip install mysql-connector

这篇关于Python MySQLdb“错误:需要Microsoft Visual C ++ 14.0"即使已安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆