1. 程式人生 > >解決pip安裝mysqldb or pymysql等失敗

解決pip安裝mysqldb or pymysql等失敗

rec recent ada all rom .py https org package

Collecting mysql
  Using cached https://files.pythonhosted.org/packages/bf/5f/b574ac9f70811df0540e403309f349a8b9fa1a25d3653824c32e52cc1f28/mysql-0.0.2.tar.gz
Collecting MySQL-python (from mysql)
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
    Complete output 
from command python setup.py egg_info: sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-wBrDYd/MySQL-python/setup.py", line 17, in <module> metadata, options = get_config() File
"setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "setup_posix.py", line 25, 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-install-wBrDYd/MySQL-python/
解決以上問題:
  sudo apt-get install python-dev libmysqlclient-dev

解決pip安裝mysqldb or pymysql等失敗