简体   繁体   中英

Pip install lxml centOSFailed building wheel for lxml

Doing pip install lxml or pip install pyquery gives this error:

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

And also this error later on

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

I have tried

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

On centOS 6.6 and using python 3.3.3 .

Thanks in advance for any help!

  1. download lxml‑3.4.3‑cp34‑none‑win32.whl from here
  2. pip install wheel
  3. change directory to download lxml package download location
  4. pip install lxml‑3.4.3‑cp34‑none‑win32.whl

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