【问题标题】:How to avoid "no module installed" in Python 3如何避免 Python 3 中的“未安装模块”
【发布时间】:2017-06-11 07:35:08
【问题描述】:

我尝试安装的每个依赖项都会导致大量故障排除,然后才能让 IDLE 识别它已安装。

我在 Mac 上,我正在使用终端的 pip 安装。我还有两个版本的 IDLE——一个用于 Python 2,另一个用于 Python 3。

pip install 说“beautifulsoup”已安装

pip3 install 说“beautifulsoup”已安装,但 IDLE 似乎并不知道它已安装。

我试过“import beautifulsoup4, import beautifulsoup, from bs4 import beautifulsoup...”

为什么我安装的每个依赖项都会发生这种情况?

【问题讨论】:

  • from bs4 import Beautifulsoup,大写。
  • 你在python解释器中试过了吗?在命令行中?只是idle有问题吗?
  • 我放弃了 IDLE。糟透了。
  • 没有空闲是好的。 @MD.KhairulBasar 这不是Beautifulsoup 它是BeautifulSoup
  • @s_vishnu 哦,是的!你是对的。

标签: python beautifulsoup pip python-idle


【解决方案1】:

不是beautifulsoup 或Beautifulsoup

试试这个from bs4 import BeautifulSoup

【讨论】:

  • 我终于明白了。
猜你喜欢
  • 2016-09-08
  • 1970-01-01
  • 1970-01-01
  • 2010-09-22
  • 1970-01-01
  • 2016-06-11
  • 1970-01-01
  • 2018-11-17
  • 2021-01-19
相关资源
最近更新 更多