0
votes

from lxml import etree command gives the below error in google colab: ModuleNotFoundError: No module named 'lxml' But if I try to install it with the command !pip3 install lxml or !pip install lxml it gives the below: Requirement already satisfied: lxml in /root/.local/lib/python3.6/site-packages (4.2.5)

1

1 Answers

0
votes

Mention of /root/.local/lib is strange and makes me think your VM is confused by earlier attempts. If you "reset all runtimes" to get a fresh VM does the following work for you? (it does for me)

!pip install lxml
from lxml import etree
help(etree)