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 ...
随机推荐
- MySQL监控全部执行过的sql语句
MySQL监控全部执行过的sql语句 查看是否开启日志记录show variables like “general_log%” ; +——————+———-+|Variable_name|Value| ...
- android:Android中用文件初始化sqlite数据库(zz)
很多时候在应用安装初始化时,需要创建本地数据库,同时为数据库添加数据,之后再从数据库中读取数据. 这里有2个思路 1.先在本地创建一个能支持android使用的sqlite数据库文件,启动时, ...
- codeforces 13EE. Holes(分块&动态树)
E. Holes time limit per test 1 second memory limit per test 64 megabytes input standard input output ...
- SSE图像算法优化系列二十四: 基于形态学的图像后期抗锯齿算法--MLAA优化研究。
偶尔看到这样的一个算法,觉得还是蛮有意思的,花了将近10天多的时间研究了下相关代码. 以下为百度的结果:MLAA全称Morphological Antialiasing,意为形态抗锯齿是AMD推出的完 ...
- 深度卷积网络(DCNN)和人类识别物体方法的不同
加州大学洛杉矶分校在PLOS Computing Biology上发表了一篇文章,分析了深度卷积网络(DCNN)和人类识别物体方法的不同:深度卷积网络(DCNN)是依靠物体的纹理进行识别,而人类是依靠 ...
- Python import其他文件夹的文件
一般情况下,import的文件和被import的文件在同一个路径下面,import也比较方便.如果这两个文件不在一个路径下面,import就比较麻烦了,需要在被import的文件路径下面新建一个__i ...
- PowerShell 显示气球提示框 1
#加载 Winform 程序集,使用Out-Null抑制输出 [system.Reflection.Assembly]::LoadWithPartialName('System.Windows.For ...
- 使用h5py操作hdf5文件
HDF(Hierarchical Data Format)指一种为存储和处理大容量科学数据设计的文件格式及相应库文件.HDF 最早由美国国家超级计算应用中心 NCSA 开发,目前在非盈利组织 HDF ...
- 最新的Delphi版本号对照
The CompilerVersion constant identifies the internal version number of the Delphi compiler. It is de ...
- pm2启动jenkins不存在tty的问题
问题 使用pm2管理jenkins, 直接启动bash script, 运行一些命令时会遇到tty不存在的错误 child_process.js:120 p.open(fd); ^ Error: EN ...