简体   繁体   English

Google Colaboratory中出现“找不到lxml,请安装它”错误

[英]“lxml not found, please install it” error on Google Colaboratory

I am using Google Colaboratory. 我正在使用Google合作实验室。 While calling pandas.read_html , I am getting an import error. 调用pandas.read_html时,出现导入错误。 I have installed lxml via pip and I can see it installed in right directory, but I am still getting this error. 我已经通过pip安装了lxml,我可以看到它安装在正确的目录中,但是仍然出现此错误。 I have tried restarting the server but nothing useful happened. 我尝试重新启动服务器,但没有发生任何有用的事情。

Please remember that if you're using python2 you will have to install lxml using: 请记住,如果您使用的是python2,则必须使用以下命令安装lxml:

pip install lxml 

If you are using python3 you will have to use: 如果您使用的是python3,则必须使用:

pip3 install lxml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM