Python 3.4.0 with MySQL database(带有 MySQL 数据库的 Python 3.4.0)
问题描述
我已经安装了Python 版本 3.4.0,我想用 MySQL 数据库做一个项目.我下载并尝试安装 MySQLdb,但是对于这个版本的 Python 没有成功.
I have installed Python version 3.4.0 and I would like to do a project with MySQL database. I downloaded and tried installing MySQLdb, but it wasn't successful for this version of Python.
有什么建议可以解决这个问题并正确安装吗?
Any suggestions how could I fix this problem and install it properly?
推荐答案
MySQLdb 不支持 Python 3,但它不是 Python 的唯一 MySQL 驱动程序.
MySQLdb does not support Python 3 but it is not the only MySQL driver for Python.
mysqlclient 本质上只是 MySQLdb 的一个分支,合并了 Python 3 支持(和一些其他改进).
mysqlclient is essentially just a fork of MySQLdb with Python 3 support merged in (and a few other improvements).
PyMySQL 是一个纯 python MySQL 驱动程序,这意味着它更慢,但它不需要编译的 C 组件或 MySQL 库和头文件安装在客户端机器上.它支持 Python 3.
PyMySQL is a pure python MySQL driver, which means it is slower, but it does not require a compiled C component or MySQL libraries and header files to be installed on client machines. It has Python 3 support.
另一种选择是简单地使用另一个数据库系统,如 PostgreSQL.
Another option is simply to use another database system like PostgreSQL.
这篇关于带有 MySQL 数据库的 Python 3.4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有 MySQL 数据库的 Python 3.4.0


- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- SQL 临时表问题 2022-01-01