Pip install lxml centOSFailed building wheel for lxml

匿名 (未验证) 提交于 2019-12-03 09:02:45

问题:

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:

  1. here
  2. pip install wheel
  3. change directory to download lxml package download location


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!