码迷,mamicode.com
首页 > 数据库 > 详细

django 错误之 OSError: mysql_config not found

时间:2018-04-21 17:35:55      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:erro   metadata   com   解决   出现   ast   bsp   osi   libs   

pip 导入包时出现如下错误

 1  Complete output from command python setup.py egg_info:
 2     /bin/sh: 1: mysql_config: not found
 3     Traceback (most recent call last):
 4       File "<string>", line 1, in <module>
 5       File "/tmp/pip-install-6p9kqc0e/mysqlclient/setup.py", line 17, in <module>
 6         metadata, options = get_config()
 7       File "/tmp/pip-install-6p9kqc0e/mysqlclient/setup_posix.py", line 44, in get_config
 8         libs = mysql_config("libs_r")
 9       File "/tmp/pip-install-6p9kqc0e/mysqlclient/setup_posix.py", line 26, in mysql_config
10         raise EnvironmentError("%s not found" % (mysql_config.path,))
11     OSError: mysql_config not found
12     
13     ----------------------------------------
14 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-6p9kqc0e/mysqlclient/

出现上面错误主要还是因为未安装python依赖,及mysqlclient:

问题解决:

1 sudo apt-get install python3-dev libmysqlclient-dev
2 pip install mysqlclient

 

django 错误之 OSError: mysql_config not found

标签:erro   metadata   com   解决   出现   ast   bsp   osi   libs   

原文地址:https://www.cnblogs.com/0x0101010/p/8901686.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!