博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[mysql]ubuntu用apt-get install后,python安装mysql-python时报mysql_config: not found
阅读量:4228 次
发布时间:2019-05-26

本文共 1724 字,大约阅读时间需要 5 分钟。

症状

(show_buiding) root@iZj6c3ru5234oqhlkiphcnZ:~/web/show_buiding# pip install mysql-pythonCollecting mysql-python  Downloading http://mirrors.aliyun.com/pypi/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)    100% |████████████████████████████████| 112kB 38.9MB/s     Complete output from command python setup.py egg_info:    sh: 1: mysql_config: not found    Traceback (most recent call last):      File "
", line 1, in
File "/tmp/pip-build-UiAlHl/mysql-python/setup.py", line 17, in
metadata, options = get_config() File "setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "setup_posix.py", line 25, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found ----------------------------------------Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-UiAlHl/mysql-python/

解决

~# sudo apt-get install libmysqld-dev

解决后效果

(show_buiding) root@iZj6c3ru5234oqhlkiphcnZ:~/web/show_buiding# pip install mysql-pythonCollecting mysql-python  Downloading http://mirrors.aliyun.com/pypi/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)    100% |████████████████████████████████| 112kB 36.7MB/s Building wheels for collected packages: mysql-python  Running setup.py bdist_wheel for mysql-python ... done  Stored in directory: /root/.cache/pip/wheels/37/dc/35/1f1c0e32a9addf0f8b0a3a569045f5351855ba0b48f78946beSuccessfully built mysql-pythonInstalling collected packages: mysql-pythonSuccessfully installed mysql-python-1.2.5

转载地址:http://fdcqi.baihongyu.com/

你可能感兴趣的文章
光靠欺骗检测是不够的:对抗多目标跟踪的攻击
查看>>
基于微区块链的V2X地理动态入侵检测
查看>>
面向V2C场景的ADAS数字孪生模型构建方法
查看>>
Comma2k19数据集使用
查看>>
面向自动驾驶车辆验证的抽象仿真场景生成
查看>>
一种应用于GPS反欺骗的基于MLE的RAIM改进方法
查看>>
自动驾驶汽车GPS系统数字孪生建模(一)
查看>>
自动驾驶汽车GPS系统数字孪生建模(二)
查看>>
CUDA 学习(五)、线程块
查看>>
CUDA 学习(八)、线程块调度
查看>>
CUDA 学习(九)、CUDA 内存
查看>>
CUDA 学习(十一)、共享内存
查看>>
游戏感:虚拟感觉的游戏设计师指南——第十四章 生化尖兵
查看>>
游戏感:虚拟感觉的游戏设计师指南——第十五章 超级马里奥64
查看>>
游戏感:虚拟感觉的游戏设计师指南——第十七章 游戏感的原理
查看>>
游戏感:虚拟感觉的游戏设计师指南——第十八章 我想做的游戏
查看>>
游戏设计的艺术:一本透镜的书——第十章 某些元素是游戏机制
查看>>
游戏设计的艺术:一本透镜的书——第十一章 游戏机制必须平衡
查看>>
UVM:7.5.1 期望值与镜像值
查看>>
UVM:7.5.2 常用操作及其对期望值和镜像值的影响
查看>>