Forums

How to install lxml on pythonanywhere?

Hi, first off I have to say I absolutely love python-anywhere. I had the majority of my website up in a matter of minutes! Okay so now to my question.

The purpose of my site is to manipulate some xml files and locally Ive been using lxml, the python module. This however requires libxml2 and libxslt to be installed inorder for lxml to install. I first checked out this post, https://www.pythonanywhere.com/forums/topic/1122/ in which the user got libxml2 and libxslt properly installed with the help of a pythonanywhere developer. That being said, that post does not include any instructions on how other users can do the same. Also, there is a link in that post which is no longer exists.

So is there anyway to get the lxml dependencies installed?

Thanks for any help!

From your link, seems like it is just

CFLAGS=-I/usr/include/libxml2/ pip install lxml

(from within a virtualenv)

Awesome, appears to have worked! Thanks!