Ubuntu下安装mysql-connector-python
来源:互联网 发布:php拼接字符串 编辑:程序博客网 时间:2024/06/06 03:45
mysql-connector-python是Mysql官方提供的Python连接mysql数据库驱动
下面介绍下Ubuntu下安装该驱动的踩坑记录,
方式一:
sudo apt-get updatesudo apt-get install python-mysql.connector
该方法安装完后的版本为2.0.4,并不是官方的最新版2.1.6,具体问题还需要进一步研究。
方式二:
1.通过pip命令搜索是否有我们要安装的包
pip search mysql-connector
应该会找到两个相关的结果 mysql-connector-python 和 mysql-connector-repackaged.
2.尝试安装
pip install mysql-connector-python
这个命令可能会出现如下类似错误:
Some externally hosted files were ignored (use --allow-external mysql-connector-python to allow).
我们可以尝试使用如下命令进行安装
pip install mysql-connector-python --allow-external mysql-connector-python
通过以下方式验证是否安装成功:
~ python>>> import mysql.connector as mc>>> mc.__version__'2.0.4'
阅读全文
0 0
- Ubuntu下安装mysql-connector-python
- ubuntu安装mysql-connector-python
- ubuntu安装mysql-connector-python
- mysql-connector-python安装
- Python:安装MYSQL Connector
- python安装mysql-connector-python
- MySQL Connector/Python 安装、测试
- MySQL Connector/Python 安装、测试
- MySQL Connector/Python 安装、测试
- ubuntu 下安装MySQL-python
- ubuntu下安装python-mysql
- ubuntu安装MySQL Connector/C++ from Source
- 【MySQL.Connector】Python下读取数据库信息
- python实战技巧1:安装MYSQL Connector
- Mac平台安装mysql-connector-python
- python mysql-connector的安装和使用
- Linux下安装使用mysql connector/C++
- Linux下安装使用 mysql connector/C++
- Linux C 信号、线程同步、线程互斥锁、线程条件变量
- PLSQL:oracle 集合类型
- Python:二叉搜索树的第k个节点
- 通过HTML5 FileReader实现上传图片预览功能
- c++pair基本用法
- Ubuntu下安装mysql-connector-python
- vue2+element 管理后台 集成解决方案
- 如何用微服务重构应用程序
- Oracle 9i RMAN恢复过程中,归档日志找不到.
- mac Apache+php环境开发
- 【近期安排】
- kamailio gdb调试
- java商品类的无限递归展示
- 【Linux】CentOS(6.8)更新yum源 -->(阿里源<ali>)