arychaud/piimask-hackathon
收藏资源简介:
# mysqlclient This project is a fork of [MySQLdb1](https://github.com/farcepest/MySQLdb1). This project adds Python 3 support and fixed many bugs. * PyPI: https://pypi.org/project/mysqlclient/ * GitHub: https://github.com/PyMySQL/mysqlclient ## Support **Do Not use Github Issue Tracker to ask help. OSS Maintainer is not free tech support** When your question looks relating to Python rather than MySQL: * Python mailing list [python-list](https://mail.python.org/mailman/listinfo/python-list) * Slack [pythondev.slack.com](https://pyslackers.com/web/slack) Or when you have question about MySQL: * [MySQL Community on Slack](https://lefred.be/mysql-community-on-slack/) ## Install ### Windows Building mysqlclient on Windows is very hard. But there are some binary wheels you can install easily. If binary wheels do not exist for your version of Python, it may be possible to build from source, but if this does not work, **do not come asking for support.** To build from source, download the [MariaDB C Connector](https://mariadb.com/downloads/#connectors) and install it. It must be installed in the default location (usually "C:\Program Files\MariaDB\MariaDB Connector C" or "C:\Program Files (x86)\MariaDB\MariaDB Connector C" for 32-bit). If you build the connector yourself or install it in a different location, set the environment variable `MYSQLCLIENT_CONNECTOR` before installing. Once you have the connector installed and an appropriate version of Visual Studio for your version of Python: ``` $ pip install mysqlclient ``` ### macOS (Homebrew) Install MySQL and mysqlclient: ``` # Assume you are activating Python 3 venv $ brew install mysql pkg-config $ pip install mysqlclient ``` If you don't want to install MySQL server, you can use mysql-client instead: ``` # Assume you are activating Python 3 venv $ brew install mysql-client pkg-config $ export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig" $ pip install mysqlclient ``` ### Linux **Note that this is a basic step. I can not support complete step for build for all environment. If you can see some error, you should fix it by yourself, or ask for support in some user forum. Don't file a issue on the issue tracker.** You may need to install the Python 3 and MySQL development headers and libraries like so: * `$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential` # Debian / Ubuntu * `% sudo yum install python3-devel mysql-devel` # Red Hat / CentOS Then you can install mysqlclient via pip now: ``` $ pip install mysqlclient ``` ### Customize build (POSIX) mysqlclient uses `pkg-config --clfags --ldflags mysqlclient` by default for finding compiler/linker flags. You can use `MYSQLCLIENT_CFLAGS` and `MYSQLCLIENT_LDFLAGS` environment variables to customize compiler/linker options. ``` $ export MYSQLCLIENT_CFLAGS=`pkg-config mysqlclient --cflags` $ export MYSQLCLIENT_LDFLAGS=`pkg-config mysqlclient --libs` $ pip install mysqlclient ``` ### Documentation Documentation is hosted on [Read The Docs](https://mysqlclient.readthedocs.io/)
# mysqlclient 本项目是[MySQLdb1](https://github.com/farcepest/MySQLdb1)的复刻分支。本项目新增了对Python 3的支持,并修复了大量漏洞。 * PyPI 页面:https://pypi.org/project/mysqlclient/ * GitHub 仓库:https://github.com/PyMySQL/mysqlclient ## 支持与反馈 **请勿通过GitHub议题追踪器寻求帮助。开源项目维护者并非免费技术支持人员** 若您的问题与Python相关而非MySQL相关: * Python 邮件列表 [python-list](https://mail.python.org/mailman/listinfo/python-list) * Slack 社区 [pythondev.slack.com](https://pyslackers.com/web/slack) 若您的问题与MySQL相关: * [MySQL 社区 Slack 频道](https://lefred.be/mysql-community-on-slack/) ## 安装 ### Windows 系统 在Windows系统上编译mysqlclient难度较高,但您可以便捷地安装预编译二进制包(binary wheels)。若您使用的Python版本无对应预编译二进制包,则可尝试从源码编译;若编译失败,**请勿寻求支持**。 若要从源码编译,请下载并安装[MariaDB C连接器(MariaDB C Connector)](https://mariadb.com/downloads/#connectors),且需将其安装至默认路径(32位系统通常为`C:Program FilesMariaDBMariaDB Connector C`或`C:Program Files (x86)MariaDBMariaDB Connector C`)。若您自行编译连接器或安装至非默认路径,请在安装前配置环境变量`MYSQLCLIENT_CONNECTOR`。完成连接器安装,并为您的Python版本配置对应版本的Visual Studio后,执行以下命令: $ pip install mysqlclient ### macOS(Homebrew 环境) 安装MySQL与mysqlclient: # 假设您已激活Python 3虚拟环境 $ brew install mysql pkg-config $ pip install mysqlclient 若您无需安装MySQL服务器,可改用mysql-client: # 假设您已激活Python 3虚拟环境 $ brew install mysql-client pkg-config $ export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig" $ pip install mysqlclient ### Linux 系统 **请注意,以下仅为基础步骤。本项目无法为所有环境提供完整编译指引。若遇编译错误,请自行排查或前往相关用户论坛寻求支持,请勿在议题追踪器中提交问题。** 您可能需要按如下方式安装Python 3与MySQL的开发头文件及依赖库: * `$ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential` # Debian / Ubuntu 系统 * `% sudo yum install python3-devel mysql-devel` # Red Hat / CentOS 系统 完成后即可通过pip安装mysqlclient: $ pip install mysqlclient ### 自定义编译(POSIX 系统) mysqlclient默认通过`pkg-config --clfags --ldflags mysqlclient`获取编译器与链接器参数。您可通过配置`MYSQLCLIENT_CFLAGS`与`MYSQLCLIENT_LDFLAGS`环境变量来自定义编译器与链接器参数。 $ export MYSQLCLIENT_CFLAGS=`pkg-config mysqlclient --cflags` $ export MYSQLCLIENT_LDFLAGS=`pkg-config mysqlclient --libs` $ pip install mysqlclient ### 文档 项目文档托管于[Read The Docs](https://mysqlclient.readthedocs.io/)平台。
数据集概述
数据集名称
mysqlclient
数据集来源
数据集功能
- 添加了对Python 3的支持
- 修复了多个bug
安装指南
Windows
- 建议使用预构建的二进制轮进行安装
- 若需从源代码构建,需安装MariaDB C Connector,并确保安装在默认位置
macOS (Homebrew)
- 安装MySQL和mysqlclient的步骤
- 可选安装mysql-client而非MySQL服务器
Linux
- 安装Python 3和MySQL开发头文件及库的通用步骤
- 通过pip安装mysqlclient
自定义构建 (POSIX)
- 使用环境变量
MYSQLCLIENT_CFLAGS和MYSQLCLIENT_LDFLAGS自定义编译器/链接器选项
文档
- 文档托管于Read The Docs




