problems installing lxml
This page is mainly about problems installing lxml
Recently, I reimaged my Windows 10 PC so lost all the Python installation modifications I had made, including the installation of this library. I would normally run through the script modules that are required and use
pip install <module>
to install them. However, when installing js2xml
, it failed on the installation of a dependency called lxml
with an error relating to Visual C++ Build Tools. It appears that lxml is not available as a standard python installation package and so, pip
uses setuptools
to (try to) compile it from source.Try as I might, I could not find the correct VC++ Build Tools to enable this to work so, after lots of searching online, happened upon this amazing page Python Extension Packages for Windows.
If you look down the page, you'll find a pre-compiled
whl
(wheels) file for lxml
, in my case, I choose the latest version, lxml-4.9.0-cp311-cp311-win_amd64.whl
.I simply downloaded this file into the root of the c: drive and ran...
pip install c:\\lxml-4.9.0-cp311-cp311-win_amd64.whl
...and installation proceeded without a hitch.
Last modified: January 15th, 2023