ubuntu安装mysql-connector-python
在安装MySQL-python时遇到报错:
sudo pip install MySQL-python
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-1n6s3hil/MySQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-1n6s3hil/MySQL-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-1n6s3hil/MySQL-python/
按照网上的方法,把/usr/local/python3/lib/python3.6路径下的configparser.py改名为ConfigParser.py,但是仍然不奏效,因此装其他的连接包
mysql-connector-python是Mysql官方提供的Python连接mysql数据库驱动,我们直接用下面命令进行安装:
sudo pip install mysql-connector-python
import mysql.connector as mc
mc.__version__
'8.0.11'
说明安装成功
ubuntu安装mysql-connector-python的更多相关文章
- Ubuntu安装MySQL和Python库MySQLdb步骤
一.安装MySQL服务器和客户端 执行以下命令: sudo apt-get install mysql-server-5.6 mysql-client-5.6 sudo apt-get install ...
- Ubuntu & MacOS安装Mysql & connector
Ubuntu & MacOS安装Mysql & connector 1. 安装MySql sudo apt-get install mysql-server apt-get insta ...
- 在Ubuntu上安装Mysql For Python
安装: 首先安装pip,并且把pip更新到最小版本 apt-get install python-pip pip install -U pip 安装mysql开发包 apt-get install p ...
- Python:安装MYSQL Connector
在Python中安装MySQL Connector有如下三种方法: 1.直接安装客户端[建议使用] pip install mysqlclient 2.安装mysql连接器 pip install - ...
- ubuntu安装mysql
好记性不如烂笔头,记录一下,ubuntu安装mysql的指令. 安装MySQL: sudo apt-get install mysql-server sudo apt-get install mysq ...
- Snippet: Fetching results after calling stored procedures using MySQL Connector/Python
https://geert.vanderkelen.org/2014/results-after-procedure-call/ Problem Using MySQL Connector/Pytho ...
- Installing MySQL Connector/Python using pip v1.5
The latest pip versions will fail on you when the packages it needs to install are not hosted on PyP ...
- ubuntu安装mysql后不能远程访问的方法
ubuntu安装mysql后不能远程访问的方法1.mysql>GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassw ...
- Ubuntu 安装 Mysql 5.6 数据库
Ubuntu 安装 Mysql 5.6 数据库 1)下载: mysql-5.6.13-debian6.0-x86_64.deb http://dev.mysql.com/downloads/mirro ...
- Ubuntu安装mysql之后,编译找不到头文件
解决Ubuntu安装mysql之后找不到mysql.h问题 安装: sudo apt-get install libmysqlclient-dev 编译: gcc test.c -o test ...
随机推荐
- Swagger Annotation 详解(建议收藏)
转载:https://www.jianshu.com/p/b0b19368e4a8 在软件开发行业,管理文档是件头疼的事.不是文档难于撰写,而是文档难于维护,因为需求与代码会经常变动,尤其在采用敏捷软 ...
- org.springframework.web.method.HandlerMethod 与 org.springframework.messaging.handler.HandlerMethod 转换失败
Springmvc hander.getclassclass org.springframework.web.method.HandlerMethod HandlerMethod.classclass ...
- NOIP初赛知识点大全-普及+提高组
NOIP初赛知识点大全-普及+提高组 https://mp.weixin.qq.com/s/vSXLDxmbBoFfZPzD8lrt3w
- xhr是什么文件类型?
xhr:XMLHttpRequest在后台与服务器交换数据,这意味着可以在不加载整个网页的情况下,对网页某部分的内容进行更新. 是Ajax的一种用法,而Ajax并不是一门语言,只是一种不需要加载整个网 ...
- webstorm11.0下载地址和webstorm11.0破解程序patcher.exe下载使用方法说明 前端IDE工具的利器
20160107以下亲测可行. webstorm11.0下载地址:http://www.fxxz.com/soft/109234.html webstorm11.0下载安装破解使用说明: 下载完Web ...
- 摘:PC客户端 XP兼容性调查
现象1:XP SP2下,客户端安装失败(或者启动失败) 解决方案:需要安装以下3个补丁(已经集成到安装包中) ==系统Hotfix(仅仅XP SP2需要安装): http://support.micr ...
- DMA(直接存储器存取)
DMA(Direct Memory Access) DMA(Direct Memory Access)即直接存储器存取,是一种快速传送数据的机制. 工作原理 DMA是指外部设备不通过CPU而直接与系统 ...
- [转]Ubuntu18.04搜狗拼音输入法候选栏乱码解决方法
经常碰到安装完搜狗拼音输入法后候选栏是乱码的情况,解决方法如下: 输入如下命令: cd ~/.config sudo rm -rf SogouPY* sogou* 1 2 之后重启即可. 安装过程可参 ...
- Eclipse安装Git插件及简单操作
0. 前言 说一件事,说起来也是好笑,工作三年半了,还没接触到团队开发,都是一个人小打小闹.因此连Git都没有使用过.感觉好Low的,这一篇,简单讲一下,Eclipse配置Git插件,并提交代码到Gi ...
- Visual Studio 2015 msvsmon.exe crashed when c++ debugging with x64
Completely uninstalling Astrill fixed the issue but this solution is not what I want. Astrill suppor ...