【问题标题】:command 'gcc' failed with exit status 1 when try to install lxml [duplicate]尝试安装 lxml 时命令“gcc”失败,退出状态为 1 [重复]
【发布时间】:2015-01-26 19:00:55
【问题描述】:

我是python新手,我尝试使用openpyxl来处理excel。当我使用sudo pip install lxml时,我遇到了这种错误信息:

In file included from src/lxml/lxml.etree.c:239:0:

/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Rolling back uninstall of lxml

感谢您的帮助

【问题讨论】:

标签: python gcc lxml


【解决方案1】:

您需要安装其他软件包,详情请参阅here

sudo apt-get install libxml2-dev libxslt-dev python-dev

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-08
    • 1970-01-01
    • 2012-04-02
    • 2012-06-21
    • 2019-12-01
    • 2023-03-19
    • 1970-01-01
    相关资源
    最近更新 更多