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 ...
随机推荐
- Python String Formatting Best Practices
https://imliyan.com/blogs/article/Python3.6%E6%96%B0%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%A0%BC%E5 ...
- protobuf 动态创建
https://www.ibm.com/developerworks/cn/linux/l-cn-gpb/index.html https://originlee.com/2015/03/14/ana ...
- Mssql Server2005中更改sa的用户名的多种方法
mssql安装上去时默认就是sa用户,大多数用户都会一直使用sa这个用户,这样数据库就存在很大的安全问题了,如果我们能把sa用户名修改,这样安全级别又高了一层哦,下面我们来看修改sa用户名的办法. ...
- PHP会员找回密码功能实现实例介绍
设置思路 1.用户注册时需要提供一个E-MAIL邮箱,目的就是用该邮箱找回密码. 2.当用户忘记密码或用户名时,点击登录页面的“找回密码”超链接,打开表单,并输入注册用的E-MAIL邮箱,提交. 3. ...
- nrm 安装与npm镜像切换
家里宽带用的移动的...访问海外镜像是相当慢,npm和maven一个道理,maven可以切换到淘宝镜像或者其他的,那么npm也可以使用国内镜像,这个时候就需要用到nrm来做镜像管理了 首先这是目前本地 ...
- Ubuntu 安装显卡驱动
首先到英伟达的官网下载最新的驱动 然后,首先要卸载Ubuntu上已有的显卡驱动 $ sudo apt-get purge nvidia* 然后仅用Ubuntu自带的显卡驱动nouveau,不过我的16 ...
- Spark On Yarn的两种模式yarn-cluster和yarn-client深度剖析
Spark On Yarn的优势 每个Spark executor作为一个YARN容器(container)运行.Spark可以使得多个Tasks在同一个容器(container)里面运行 1. Sp ...
- 【转】JAVA反射与注解
转载自:https://www.daidingkang.cc/2017/07/18/java-reflection-annotations/ 前言 现在在我们构建自己或公司的项目中,或多或少都会依赖几 ...
- FasterRCNN 提升分类精度(转)
近年来,随着深度学习的崛起,计算机视觉得到飞速发展.目标检测作为计算机视觉的基础算法,也搭上了深度学习的快车.基于Proposal的检测框架,从R-CNN到Faster R-CNN,算法性能越来越高, ...
- 居于U2000手机管理光猫,小区运营商FTTH光猫注册神器,MA5680T手机管理,自动添加光猫
此软件居于U2000开发,需要U2000管理支持 主要功能: 光猫查看->上线情况.下线原因.下线时间.光猫重启.光模块发送功能.接收功能.温度 Radius诊断->用户基本信息.拨打电话 ...