输入命令:

:~$ pip install mysqlclient

报错:

Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/f7/a2/1230ebbb4b91f42ad6b646e59eb8855559817ad5505d81c1ca2b5a216040/mysqlclient-1.3.14.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-0k211e13/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/tmp/pip-install-0k211e13/mysqlclient/setup_posix.py", line 53, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-install-0k211e13/mysqlclient/setup_posix.py", line 28, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-0k211e13/mysqlclient/

分析问题

未安装mysql-server和mysql-client

执行以下语句:

sudo apt-get install mysql-server mysql-client
sudo  apt-get install libmysqlclient-dev python3-dev
然后再安装mysqlclient就不会报错找不到'mysql_config'了

mysql-server 与 mysql-client的介绍
mysql-server 与 mysql-client是DBMS的两个面向不同操作对象的工具。
server是DBMS面向物理层次,包含存储数据的一系列机制、处理方法的集成;
client是DBMS面向用户,提供一系列工具为用户所用,这些工具包括通常写的sql在内都要通过server的编译才能操作物理数据。
客户--client--server物理数据。
服务器--mysql-server是服务端
mysql-server
是mysql核心程序,生成管理数据库实例,数据库实例任务调度线程之类,并提供相关接口供不同客户端调用。
 mysql-client
是操作数据库实例的工具操作mysql实例的客户端有很多,mysql-client只是其中一种,包括mysql,mysqldump,mysqlslap,
这些访问,备份,压力测试的工具mysql-server是服务端。

安装mysqlclient报OSError: mysql_config not found的更多相关文章

  1. 安装 mysqlclient 报 mysql_config not found

    安装 mysqlclient 报 mysql_config not found raise EnvironmentError("%s not found" % (mysql_con ...

  2. pip 安装mysqlclient报错OSError: mysql_config not found

    执行 pip install mysqlclient 报错信息如下: [root@CentOS7-demo bin]# pip install mysqlclient Collecting mysql ...

  3. 安装Python mysqlclient出现“OSError: mysql_config not found”错误

    问题:               使用Python3开发一个管理平台,用MySQL数据库存放元数据.使用pip安装mysqlclient模块时出现“OSError: mysql_config not ...

  4. Ubuntu 下安装mysqlclient报错

    pip3 install mysqlclient 报错信息 问题描述: Complete output from command python setup.py egg_info: /bin/sh: ...

  5. linux安装mysqlclient报错

    错误信息 Collecting mysqlclient Using cached mysqlclient-1.3.12.tar.gz Complete output from command pyth ...

  6. python安装mysqlclient模块时报mysql_config not found解决方法

    在配置Flask框架,安装mysqlclient时报一下错误 翻译了一下大概是 mysql_config  文件没找到, 解决方法是安装缺失的文件. sudo apt install libmysql ...

  7. Mac OS 下安装mysqlclient报“mysql_config not found”的解决

    如问题所示,应该是你没有将mysql_config所在文件夹加入系统的PATH路径,解决方案下: 1.第一步找到你的mysql_config所在位置 1.1. 如果是直接安装mysql,所在位置应该是 ...

  8. 关于linux下安装mysqlclient报 Failed building wheel for mysqlclient问题

    导入下列依赖包,搞定 sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev ...

  9. python 安装mysql报错

    原 安装Python mysqlclient出现“OSError: mysql_config not found”错误 2016年06月01日 12:15:11 wangtaoking1 阅读数:11 ...

随机推荐

  1. SQL:Example Uses of the SUBSTRING String Function

    ---Example Uses of the SUBSTRING String Function --http://www.sql-server-helper.com/tips/tip-of-the- ...

  2. JavaScript (预热)

    希望把某个元素移除你的视线: 1.display:none;   显示为无 2.visibility:hidden; 隐藏 3.width\height; 4.透明度: 5.left\top; 6.拿 ...

  3. JS图片赖加载例子

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. python str、int、dict

    一.str print(dir(int))#['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', ...

  5. Linux下利用script命令录制并回放终端会话

    Linux下利用script命令录制并回放终端会话 核心命令 script 和 scriptreplay 录制屏幕 script -t 2>timescript typescript 命令解释: ...

  6. 生成centos7 安装脚本

    [root@us-1-217 install]# cat gen7.py #!/usr/bin/env python # -*- coding: utf-8 -*- import os, crypt ...

  7. 如何给PDF加水印

  8. springMvc-入参对象

    1.修改或者添加对象 2.多添件查询时候也会遇到 springMvc能够根据属性自动的封装pojo的对象并且支持关联的对象:大致的原理是在传入后台的时候把前台的属性和对象封装成json的形式传入后台, ...

  9. 织梦CMS调用文章列表时,怎么显示短时间格式

    问题描述:织梦在上传文章的时候,默认的上传文章的时间格式都是年.月.日.小时.分钟.秒的格式,怎么才能实现仅显示年.月.日的格式呢? 解决方法: [field:pubdate function=&qu ...

  10. Git软件的学习

    第一部分:我的git地址是https://github.com/ZHU19007/gitLearning 第二部分:我对git的认识 一.Git是一款免费.开源的分布式版本控制工具.而Github是用 ...