ImportError:无法导入名称BeatiFulsGroup

2024-09-30 05:32:38 发布

您现在位置:Python中文网/ 问答频道 /正文

在我的程序中,我使用了from bs4 import BeatifulSoup,我得到了错误:

Traceback (most recent call last):
    File "D:\Noahs program\python black hat\retrievescreenshot.py", line 2, in <module>
    from bs4 import BeatifulSoup
ImportError: cannot import name BeatifulSoup

我使用Python2.7.15中的pip.exe从命令行安装了bs4

pip install bs4

我试过了pip install beautifulsoup4,它说安装一切就绪


Tags: installpipfromimport程序most错误call
2条回答

您的import中有一个输入错误。。。应该是:

from bs4 import BeautifulSoup   #<  not BeatifulSoup
pip install beautifulsoup4

然后您就可以导入它了

相关问题 更多 >

    热门问题