无法在 python 中导入 beautifulsoup
Unable to import beautifulsoup in python
我正在使用 Python.7.10 并使用 pip 安装了 beautifulsoup。软件包安装成功。但是当我尝试导入 beautifulsoup 时,出现了这个错误:
ImportError: No module named beautifulsoup
我检查了我安装的模块列表,我在安装的模块列表中找到了 beautifulsoup 模块:
您安装了 BeautifulSoup 版本 3;该模块名为 BeautifulSoup
,大写 B
和 S
:
from BeautifulSoup import BeautifulSoup
您真的想升级到BeautifulSoup 4。BeautifulSoup 3 已于 2012 年停产。
要安装版本 4,请使用:
pip install beautifulsoup4
并导入 bs4
:
from bs4 import BeautifulSoup
但是在继续之前一定要研究 project documentation。
我正在使用 Python.7.10 并使用 pip 安装了 beautifulsoup。软件包安装成功。但是当我尝试导入 beautifulsoup 时,出现了这个错误:
ImportError: No module named beautifulsoup
我检查了我安装的模块列表,我在安装的模块列表中找到了 beautifulsoup 模块:
您安装了 BeautifulSoup 版本 3;该模块名为 BeautifulSoup
,大写 B
和 S
:
from BeautifulSoup import BeautifulSoup
您真的想升级到BeautifulSoup 4。BeautifulSoup 3 已于 2012 年停产。
要安装版本 4,请使用:
pip install beautifulsoup4
并导入 bs4
:
from bs4 import BeautifulSoup
但是在继续之前一定要研究 project documentation。