I'm having the same issue, now the version of lxml is 5.4.0 but I still get the error.when I use
from lxml.etree import tostring
I got
ModuleNotFoundError: No module named 'lxml.etree'
Did you solve this problem ?I dont know how to solve it.