What is python-dev package used for

前端 未结 3 431
执笔经年
执笔经年 2020-12-12 21:39

I recently installed lxml.

Before that I had to install all the dependencies for that. So I tried to install liblxml2-dev, liblxslt1-

3条回答
  •  借酒劲吻你
    2020-12-12 22:22

    python-dev contains the header files you need to build Python extensions. lxml is a Python C-API extension that is compiled when you do pip install lxml. The lxml sources have at least something like #include in the code. The compiler looks for the Python.h file during compilation, hence those files need to be on your system such that they can be found. On Linux typically, the binary libraries and header files of packages like python are separate. Hence you can have Python installed and everything works fine but when you want to build extensions you need to install the corresponding dev package.

提交回复
热议问题