在Windows环境下可以直接使用pip安装mysql-connector-python
- pip install mysql-connector-python
在debian12环境下pip无法正常安装mysql-connector-python。
- 访问下载网站,选择“源码下载” 和 “与平台无关”获取最新下载地址https://dev.mysql.com/downloads/connector/python/
- mkdir mysqlpyinstall
- wget https://cdn.mysql.com//Downloads/Connector-Python/mysql-connector-python-8.4.0-src.tar.gz
- gzip mysql-connector-python-8.4.0-src.tar.gz -d
- tar -x -f mysql-connector-python-8.4.0-src.tar
- cd mysql-connector-python-8.4.0-src/mysql-connector-python/
- python3 setup.py
发表回复