带有MySQL数据库的Python 3.4.0 [英] Python 3.4.0 with MySQL database

查看:64
本文介绍了带有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 本质上只是合并了Python 3支持的MySQLdb的一个分支(还有一些其他改进).

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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