简体   繁体   中英

Error while installing mysqlclient on Fedora25

I am trying to install mysqlclient in my virtual environment which runs on python3.5.2 but it always throws error as:

(venv) [kevran@localhost mysite]$ pip install mysqlclient   
  Collecting mysqlclient        
  Using cached mysqlclient-1.3.10.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: command not found   
    Traceback (most recent call last):   
      File "<string>", line 1, in <module>  
      File "/tmp/pip-build-m92fr1vk/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()   
      File "/tmp/pip-build-m92fr1vk/mysqlclient/setup_posix.py", line 44, in get_config     libs = mysql_config("libs_r")    
      File "/tmp/pip-build-m92fr1vk/mysqlclient/setup_posix.py", line 26, 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-build-m92fr1vk/mysqlclient/

Yu need to install mysql-devel package in OS.

yum install mysql-devel

or something like that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM