带有 MySQL 数据库的 Python 3.4.0

2023-05-24数据库问题
5

本文介绍了带有 MySQL 数据库的 Python 3.4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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

The End

相关推荐

Mysql目录里的ibtmp1文件过大造成磁盘占满的解决办法
ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致...
2025-01-02 数据库问题
151

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

MySQL groupwise MAX() 返回意外结果
MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)...
2024-04-16 数据库问题
13

MySQL SELECT 按组最频繁
MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)...
2024-04-16 数据库问题
16

为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同
Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)...
2024-04-16 数据库问题
13

MySQL GROUP BY DateTime +/- 3 秒
MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)...
2024-04-16 数据库问题
14