akun/PyHackerNews

默认没装mysql的情况下会报错EnvironmentError: mysql_config not found

Closed this issue · 2 comments

Downloading/unpacking MySQL-python==1.2.5 (from -r requirements/prod.txt (line 3))
  Downloading MySQL-python-1.2.5.zip (108Kb): 108Kb downloaded
  Running setup.py egg_info for package MySQL-python
    sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/opt/PyHackerNews/venv/build/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
    Complete output from command python setup.py egg_info:
    sh: 1: mysql_config: not found

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/opt/PyHackerNews/venv/build/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

----------------------------------------

是否把libmysqlclient-dev也加入到requirements
然后我在项目里似乎没找到使用MySQLdb的文件?

akun commented

我完善下安装文档,很多前提软件包安装没写出来

akun commented

完善了手工安装文档说明,会涉及该软件包的安装