Ubuntu pip 安装 mysql-python包出错
程序员文章站
2024-02-10 13:30:40
...
问题描述如下,报没有找到mysql_config
环境变量
$ pip install mysql-python
Collecting MySQL-python==1.2.5 (from -r requirement (line 16))
Downloading MySQL-python-1.2.5.zip (108kB)
100% |################################| 112kB 56kB/s
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-HVEeJz/MySQL-python/setup.py", line 17, in <module>
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-HVEeJz/MySQL-python/
解决:
因为相关依赖没有安装
Ubuntu/Debian
sudo apt-get install libmysqlclient-dev
推荐阅读
-
Ubuntu pip 安装 mysql-python包出错
-
macos 安装MySQLdb:pip install MySQL-python
-
使用anaconda的pip安装第三方python包的操作步骤
-
ubuntu-Ubuntu php5.3.0 安装包或安装指令
-
ubuntu下用dpkg命令行运行deb安装包的方法
-
虚拟机中安装Ubuntu后,安装VMwareTools出错的解决办法:Not enough free space to extract VMwareTools
-
Python2.7.10以上pip更新及其他包的安装教程
-
.deb 包如何安装到指定目录; Ubuntu; Debian like;
-
ubuntu下安装mysql出错.该如何解决
-
安装Python的cv2包出错