在 macOS 上使用 Homebrew 安装 Python BeautifulSoup 包

问题描述 投票:0回答:1

我使用 Homebrew 在 macOS 上安装了 Python。现在,我正在尝试使用 BeautifulSoup,因此我执行了以下命令:brew install python-beautifulsoup4。但是,我遇到一条消息,指出“警告:没有名为“python-beautifulsoup4”的可用公式”。

这可能是什么问题?我应该如何正确安装和使用这个Python包?

python beautifulsoup homebrew
1个回答
0
投票

您应该使用

pip
来安装。像这样:
pip install beautifulsoup4
pip3 install beautifulsoup4

© www.soinside.com 2019 - 2024. All rights reserved.