我已经研究了一段时间,每次我尝试在Django项目的virtualenv上安装“ mysqlclient”时都会失败
这是它给出的错误
(mahali) waploaj@Workstation:~/Desktop/python_sandbox/lecture/app/Django/leyla$ pip install mysqlclient
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/waploaj/Desktop/python_sandbox/lecture/app/Django/leyla/mahali/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uhuw4jqo/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uhuw4jqo/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-uhuw4jqo/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-uhuw4jqo/mysqlclient/
Complete output (12 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uhuw4jqo/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/tmp/pip-install-uhuw4jqo/mysqlclient/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-uhuw4jqo/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
我在做什么错。您可以负担得起我英语的任何患者,我将不胜感激
。