src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory

核能气质少年 提交于 2019-11-27 10:38:21

Install libxslt-devel & libxml2-devel using

sudo apt-get install libxml2-dev libxslt1-dev

After installing follow the above one

user2086641
  1. Install Cython using

    easy_install Cython

  2. After completion of cython, install libxslt-devel & libxml2-devel using

    yum install libxslt-devel libxml2-devel

This worked for me.

The selected answer is right but I just wanted to add for those who use Fedora: libxslt1 is called libxslt when using dnf. So the command is:

sudo dnf install libxml2-devel libxslt-devel

devel for dnf is the same as dev for apt-get.

without sudo rights you can install lxml with:

STATIC_DEPS=true pip install lxml

As mentioned in the lxml documentation

The certified answer works perfectly. But just adding the installation command for alpine to install libxslt-devel & libxml2-devel

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