安装了美丽的模块,但可以找到

发布于 2025-02-11 21:29:04 字数 397 浏览 0 评论 0原文

我在Mac上安装了BeautifulSoup4,但是当我尝试在Spyder中导入模块时,它说ModulenotFoundError:没有名为“ Beautifutsoup”的模块,

尝试使用它:

import beautifulsoup4
import beautifulsoup
from bs4 import beautifulsoup
import bs4

等等...

我 它已经安装了。

我还检查了它是否安装在Python 3.9中,这是Spyder说的同一版本,说它正在我的计算机上使用。

我很困惑,请帮忙!此模块的更新在哪里

:我认为我需要一个单独的环境,所以我尝试下载Minconda找不到命令,所以我不知道如何获得minconda

I installed beautifulsoup4 on my mac but when I tried to import the module in spyder, it says ModuleNotFoundError: No module named 'beautifulsoup'

I have tried importing it with:

import beautifulsoup4
import beautifulsoup
from bs4 import beautifulsoup
import bs4

etc...

I have also tried reinstalling the module in terminal and it says that it is already installed.

I have also checked that it was installed in python 3.9 which is the same version Spyder says it is using on my computer.

I am so confused please help! Where is this module

Update: I think I need a separate environment so I tried to download miniconda but when I try to install it it says that it can't install because I already have it but when I run any conda command in terminal it says command not found so I don't know how to get miniconda

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骄傲 2025-02-18 21:29:04

您应该检查您的代码。我看到的教程(有很多在线)以这种方式导入美丽的小组(套管很重要 - bs是较高的情况!):

from bs4 import BeautifulSoup

示例:示例:
https://beautiful-soup--4.readthedocs.io /en/最新/#制作 - 组合

You should check your code. The tutorials I see (there are many online) all import beautifulsoup this way (casing matters - the B and the S are upper case!):

from bs4 import BeautifulSoup

Example:
https://beautiful-soup-4.readthedocs.io/en/latest/#making-the-soup

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文