【问题标题】:Pip install lxml centOSFailed building wheel for lxmlpip install lxml centOSFailed build wheel for lxml
【发布时间】:2015-09-14 15:11:16
【问题描述】:

执行 pip install lxml 或 pip install pyquery 会出现此错误:

gcc: error trying to exec 'cc1': execvp: No such file or directory
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for lxml
Failed to build lxml

以后还会出现这个错误

gcc: error trying to exec 'cc1': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-B0y8MK/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-9goo1z-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-B0y8MK/lxml

我试过了

yum install gcc
yum remove audit
yum install gcc
yum install libxslt-devel libxml2-devel
yum install python-devel

在 centOS 6.6 和使用 python 3.3.3 上。

提前感谢您的帮助!

【问题讨论】:

    标签: python gcc centos pip


    【解决方案1】:
    1. here下载lxml‑3.4.3‑cp34‑none‑win32.whl
    2. 点安装轮子
    3. 更改目录以下载 lxml 包下载位置
    4. pip install lxml‑3.4.3‑cp34‑none‑win32.whl

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-11
      • 2016-07-01
      • 1970-01-01
      • 2019-05-17
      • 1970-01-01
      • 2013-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多