Pip install lxml centOSFailed building wheel for l

2019-05-26 01:14发布

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条回答
相关推荐>>
2楼-- · 2019-05-26 01:43
  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
查看更多
登录 后发表回答