Я попытался установить mysqlclient, и он жалуется на то, что файл mysql_config отсутствует. После прочтения документов. Я пытался установить sudo yum install mariadb-devel
и sudo yum install mysql-devel
. Тем не менее я получаю ту же ошибку. Я использую centos 7
sudo pip install mysqlclient
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/home/bramaraju/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/bramaraju/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: https://security_automation:****@box.jfrog.io/box/api/pypi/Security-PyPi-Local/simple, https://security_automation:****@box.jfrog.io/box/api/pypi/box-pypi/simple, https://pypi.python.org/simple
Collecting mysqlclient
Downloading https://box.jfrog.io/box/api/pypi/box-pypi/packages/packages/f8/9b/5db9a03e2088a87c26e3e4d4c7f7e8f4c2dbae610f9521cdfac15755a795/mysqlclient-1.4.5.tar.gz (86kB)
|████████████████████████████████| 92kB 5.3MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KrW_Ny/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KrW_Ny/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-KrW_Ny/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-KrW_Ny/mysqlclient/
Complete output (12 lines):
sh: mysql_config: command not found
sh: mariadb_config: command not found
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-KrW_Ny/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
EnvironmentError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Но пока устанавливаю mysql-devel. Я получаю низкую ошибку. устанавливается с помощью sudo yum install mysql-devel --skip-broken
--> Finished Dependency Resolution
Error: Package: zlib-devel-1.2.7-18.el7.x86_64 (cie-base)
Requires: zlib = 1.2.7-18.el7
Installed: lib64zlib1-1.2.8-7.1.mga5.x86_64 (@security-rpm-local-thirdparty)
zlib = 1.2.8-7.1.mga5
Available: zlib-1.2.7-18.el7.i686 (cie-base)
zlib = 1.2.7-18.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest