zoukankan      html  css  js  c++  java
  • pip install lxml mysql-python error

    问题0:

    在安装 mysql-python时,会出现:

    复制代码
    sh: mysql_config: not found
    Traceback (most recent call last):
      File "setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    复制代码

    只要原因是没有安装:libmysqlclient-dev

    sudo apt-get install libmysqlclient-dev

    找到mysql_config文件的路径

    sudo updatedb
    locate mysql_config

    mysql_config的位置为:/usr/bin/mysql_config

    在mysql-python源码包下找到:setup_posix.py 文件,然后找到文件中的 mysql_config.path 将其值改为:/usr/bin/mysql_config,然后 sudo python setup.py install ,就ok了

    问题1:

    ERROR: /bin/sh: 1: xslt-config: not found

    make sure the development packages of libxml2 and libxslt are installed **

    参考:

    http://stackoverflow.com/questions/5178416/pip-install-lxml-error

    http://stackoverflow.com/questions/21489720/installing-pyquery-via-pip

    解决:

    apt-get install libxslt1-dev

    问题2:

    error: Setup script exited with error: command 'gcc' failed with exit status 1

    通过安装如下库即可解决:

    sudo apt-get install python-dev
  • 相关阅读:
    广域网(ppp协议、HDLC协议)
    0120. Triangle (M)
    0589. N-ary Tree Preorder Traversal (E)
    0377. Combination Sum IV (M)
    1074. Number of Submatrices That Sum to Target (H)
    1209. Remove All Adjacent Duplicates in String II (M)
    0509. Fibonacci Number (E)
    0086. Partition List (M)
    0667. Beautiful Arrangement II (M)
    1302. Deepest Leaves Sum (M)
  • 原文地址:https://www.cnblogs.com/kylinfish/p/4348867.html
Copyright © 2011-2022 走看看