解决:python安装mysqldb模块报 EnvironmentError: mysql_config not found
最近学习python操作mysql需要安装mysqldb模块
出现EnvironmentError: mysql_config not found
经网上查看,需要安装mysql客户端开发库libmysqlclient-dev
sudo apt-get install libmysqlclient-dev
所以安装mysql及mysqldb的正确操作应为
- 安装数据库
sudo apt-get install mysql-server
- 安装开发库(支持mysql_config)
sudo apt-get install libmysqlclient-dev 如果是MariaDB
sudo apt-get install libmariadbclient-dev
- 安装mysqldb
pip install mysql-python
解决:python安装mysqldb模块报 EnvironmentError: mysql_config not found的更多相关文章
- windows(32位 64位)下python安装mysqldb模块
windows(32位 64位)下python安装mysqldb模块 www.111cn.net 编辑:mengchu9 来源:转载 本文章来给各位使用在此windows系统中的python来安装一个 ...
- python安装mysqlclient模块报fatal error: Python.h:解决方法
在搭建Flask框架安装mysqlclient模块时候老是报fatal error: Python.h:错误,折腾老半天,百度了老半天看了不少大神帖子,就是没解决, 后来发现这不是个BUG,都是自己的 ...
- centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1
要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...
- 解决python2安装MySQL-python模块报错
今天电脑重装系统,所有软件都重装一遍,MySQLdb模块一直装不好,纠结了好久,终于解决,方法分享给大家. MySQLdb模块安装: 1.下载MySQL-pyhon模块,网站为:https://pyp ...
- python安装MySQLdb模块
以Ubuntu下安装为例: 下载地址:https://pypi.python.org/pypi/MySQL-python/ 解压后直接进入解压目录运行安装命令. python setup.py ins ...
- Python 安装MySQLdb模块遇到报错及解决方案:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
一.问题 系统:win7 64位 在下载MySQL-python-1.2.5.zip,使用python setup.py install 安装时,出现以下报错: _mysql.c(42) : fata ...
- mac下python安装MySQLdb模块
参考:http://blog.csdn.net/yelyyely/article/details/41114449 1.调整到anaconda下的python 2.安装有关程序 brew instal ...
- Windows下python 安装Mysqldb模块
CMD执行 pip install mysql-python 报错如下: 1.如果报类似 Microsoft Visual C++ 9.0 is required < Unable to fin ...
- Mac OS X 下安装python的MySQLdb模块
参考资料: mac os x下python安装MySQLdb模块 http://www.codeif.com/post/1073/ MAC OSX使用Python安装模块有关问题 http:// ...
随机推荐
- C#设计模式:策略者模式(Stragety Pattern)
一,什么是策略模式? 1,针对同一命令或行为,不同的策略做不同的动作. 2,比如针对一组算法,将每个算法封装到具有公共接口的独立的类中,从而使它们可以相互替换.策略模式使得算法可以在不影响到客户端的情 ...
- linux 日常学习
杀掉进程 ps aux |grep caddy axy5418+ 14186 0.0 1.7 117032 10372 ? Sl 02:17 0:00 caddy axy5418+ 14332 0.0 ...
- 更新252板子代码(前端+cgi中间件)
1.前端代码 前端的html.css.js代码,利用打包工具生成dist文件夹,放入lighttpd的指定目录. 2.cgi中间件 1)编译 1.下载代码工程V100R100C00 2.将工程代码以共 ...
- linux性能分析工具Ntop
- CentOS7单用户模式修改密码
以下内容均摘抄自:https://blog.csdn.net/ywd1992/article/details/83538730 亲测有用,谢谢大佬的好文章 1.启动centos系统,并且当在GRUB ...
- (ACM模板)不定长数组vector
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> usi ...
- 【LeetCode】一种博弈思路 minimax(共5题)
[292] Nim Game (2019年3月12日,E) 有一堆石头,游戏规则是每次可以从里面拿1-3颗石头,拿到最后的石头的人赢.你和你的对手都 optimal 的玩这个游戏,问先手(也就是你)能 ...
- phpstorm git配置
一. 安装git apt-get install git 二. 选择file->setting->Version Control->git 在此输入框输入git的执行路径 三.配置g ...
- python request 接口测试get和post请求
开发IDE:pycharm python:2.7.10 get请求 # coding: UTF-8 #兼容中文字符,如果没有这句,程序中有中文字符时,运行会报错 import requests #引用 ...
- CentOS7 安装KVM
检测 输入命令如果有输出表示CPU支持虚拟化 grep -E 'svm|vmx' /proc/cpuinfo 检查模块(保证有如下内容) lsmod | grep kvm 结果如下:(kvm_inte ...