["python"]
Getting "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?" when installing lxml through pip

I'm getting an error Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? when trying to install lxml through pip. c:\users\f\appdata\local\temp\xmlXPathInitqjzysz.c(1) : fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? ********************************************************************************* error: command 'C:\\Users\\f\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2 I don't find any libxml2 dev packages to install via pip. Using Python 2.7 and Python 3.x on x86 in a virtualenv under Windows 10.
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