Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install libxml2 failed

I'm trying to install libxml2 since I came to know this is dependency for lxml. Facing issues like:

Could not find dependencies

Any idea how to install libxml2?

My python version is 3.5.2.

like image 886
Pradhaban Avatar asked Jul 01 '16 14:07

Pradhaban


People also ask

How do I install libxml2 on Windows?

Within c:\tools I have a directory called libxml that contains the stuff I want from these zips. Create a suitable directory to extract the desired content from the zips into. Extract the following files from [the bin subdirectory of] the libxml archive [e.g. libxml2-2.9. 1-win32-x86_64.

How do I download libxml2?

Locate where you can get the latest version of the software. (From google, libxml2 webpage is here: http://www.xmlsoft.org/downloads.html. From there, you can find the ftp location where you can download the software.

What is pip install lxml?

pip install lxml. Released: Jul 1, 2022. Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.


1 Answers

Official documentation has the installation steps for Linux, Mac OS and Windows.

To install lxml on Ubuntu, you first will need to install the binary dependencies:

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

Then you will be able to install lxml using pip:

pip install lxml

You cannot install libxml or libxslt using pip as they are not Python packages.

like image 55
NickAb Avatar answered Sep 28 '22 22:09

NickAb