0
にはmysqlclientをインストールすることはできません:Googleの後iがあるmysqlclientをインストールするPIPを使用する場合、それはmysql_configをが見つからないことを示してcentos7.3
[[email protected] local]# pip install mysqlclient Collecting mysqlclient Downloading http://mirrors.aliyun.com/pypi/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz (89kB)
100% |████████████████████████████████| 92kB 13.0MB/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-OJR4Al/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 26, 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-OJR4Al/mysqlclient/
、私はにいくつかのアドバイスを見つけるにsudoのyumのpython-develのインストールmysqlの-develの
が、それはうまくいきませんでした:
[[email protected] local]# yum install python-devel mysql-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package python-devel-2.7.5-58.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mariadb-devel.x86_64 1:5.5.56-2.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.56-2.el7 for package: 1:mariadb-devel-5.5.56-2.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed
Removing mariadb-libs.x86_64 1:5.5.56-2.el7 - u due to obsoletes from installed mysql-community-libs-5.7.20-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.56-2.el7 for package: 1:mariadb-devel-5.5.56-2.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:mariadb-devel-5.5.56-2.el7.x86_64 (base)
Requires: mariadb-libs(x86-64) = 1:5.5.56-2.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
私のCentOSのバージョンは7.3、Pythonの3.4.2
です
#yumをmysql_community_libs ロードされたプラグインを削除します – skystone