mysql ubuntu client_ubuntu 系列安装 mysqlclient 报错解决
报错
sudo -H pip3 install -U mysqlclient -i https://mirrors.aliyun.com/pypi/simple/
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting mysqlclient
Using cached https://mirrors.aliyun.com/pypi/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-7ewd4e88/mysqlclient/setup.py", line 16, in
metadata, options = get_config()
File "/tmp/pip-install-7ewd4e88/mysqlclient/setup_posix.py", line 51, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-7ewd4e88/mysqlclient/setup_posix.py", line 29, 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-7ewd4e88/mysqlclient/
解决
sudo apt install libmysqlclient-dev
sudo -H pip3 install -U mysqlclient -i https://mirrors.aliyun.com/pypi/simple/
本文链接:https://www.92ez.com/?action=show&id=23485
!!! 转载请先联系non3gov@gmail.com授权并在显著位置注明作者和原文链接 !!!小黑屋
提示:技术文章有一定的时效性,请先确认是否适用你当前的系统环境。