Installing lxml, libxml2, libxslt for Python 3.5 on Windows 10
lxml
uses libxml2
, libxslt
(in background) but libxml2
, libxslt
are not Python modules - it's C/C++ libraries. So you can't install them using pip. You have to download and install them manually.
You can find precompiled lxml
for Windows on Unofficial Windows Binaries for Python Extension Packages
cp35
in file name means version for Python 3.5.win32
in file name means version for 32bit Python.amd64
in file name means version for 64bit Python.
You probably use 32bit Python because I see 32
and (x86)
in your path
C:\program files (x86)\python35-32\python.exe
You should find links to libxml2
, libxslt
on this page too. This libraries has .dll and .exe files and you can put them in any folder which is in PATH
variable. Libraries mostly are installed in C:\Windows
or in subfolder.
libxml2
, libxslt
may have also C/C++ header files *.h
which you may need when you compile lxml
. (on Linux this files are in separated packageslibxml2-dev
, libxslt-dev
)
BTW: You can use Anaconda
distribution (instead of Python.org
distribution). It installs the same Python but with some precompiled modules - ie. it installs lxml
automatically. Anaconda
can be the best solution for Windows users.
List of all modules: https://docs.continuum.io/anaconda/pkg-docs
Getting Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? when installing lxml through pip
Install lxml from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml for your python version. It's a precompiled WHL with required modules/dependencies.
The site lists several packages, when e.g. using Win32 Python 3.11, use lxml‑4.9.0‑cp311‑cp311‑win32.whl
.
Download the file, and then install with:
pip install C:\path\to\downloaded\file\lxml‑4.9.0‑cp311‑cp311‑win32.whl
Can't install python lxml (and libxml2) on windows
You can try the binary from here.
First do pip install wheel
and then pip install <filename.whl>
to install the downloaded binary.
Related Topics
Two Variables in Python Have Same Id, But Not Lists or Tuples
Problem with Multi Threaded Python App and Socket Connections
What Is _Future_ in Python Used for and How/When to Use It, and How It Works
Date Ticks and Rotation in Matplotlib
Check If Item Is in an Array/List
How to Draw Intersecting Planes
Is It Ever Useful to Use Python's Input Over Raw_Input
Plotting a Decision Boundary Separating 2 Classes Using Matplotlib's Pyplot
Consistently Create Same Random Numpy Array
Is There a Matplotlib Equivalent of Matlab's Datacursormode
How to Resolve Typeerror: Can Only Concatenate Str (Not "Int") to Str
Simple Argparse Example Wanted: 1 Argument, 3 Results
How to Read and Write Ini File with Python3
How to Add an Integer to Each Element in a List
Escape String Python for MySQL
A Good Way to Get the Charset/Encoding of an Http Response in Python
How to Do Multiple Arguments to Map Function Where One Remains the Same