【问题标题】:"lxml not found, please install it" error on Google ColaboratoryGoogle Colaboratory 出现“找不到 lxml,请安装”错误
【发布时间】:2018-03-20 07:20:36
【问题描述】:

我正在使用 Google Colaboratory。在调用 pandas.read_html 时,我收到导入错误。我已经通过 pip 安装了 lxml,我可以看到它安装在正确的目录中,但我仍然收到此错误。我尝试重新启动服务器,但没有发生任何有用的事情。

【问题讨论】:

  • 您使用的是什么操作系统/Python版本?
  • 3.6.我正在使用在线笔记本服务器。 colab.research.google.com
  • 你用过pip3 install lxml吗?

标签: python pandas google-colaboratory


【解决方案1】:

请记住,如果您使用的是 python2,则必须使用以下命令安装 lxml:

pip install lxml 

如果您使用的是 python3,则必须使用:

pip3 install lxml

【讨论】:

  • 万岁!玩得开心:)
  • 这对我不起作用:/。 Requirement already satisfied: lxml in /usr/local/lib/python3.6/dist-packages (4.2.3) 错误:FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
  • 好的:你必须重启执行环境才能工作
猜你喜欢
  • 2019-01-11
  • 1970-01-01
  • 2020-05-05
  • 2014-03-05
  • 2020-01-10
  • 1970-01-01
  • 1970-01-01
  • 2017-11-05
  • 1970-01-01
相关资源
最近更新 更多