Python 3.x 无法在Mac Os上用python安装beautifulsoup4

Python 3.x 无法在Mac Os上用python安装beautifulsoup4,python-3.x,macos,beautifulsoup,Python 3.x,Macos,Beautifulsoup,我正在尝试使用以下命令在mac中安装beautifulsoup4: pip3 install beautifulsoup4 但我得到了以下错误: Could not find a version that satisfies the requirement beautifulsoup4 (from versions: ) No matching distribution found for beautifulsoup4 如何解决此问题?您可以从下载tarball 提取它,然后运行: sudo

我正在尝试使用以下命令在mac中安装
beautifulsoup4

pip3 install beautifulsoup4
但我得到了以下错误:

Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4

如何解决此问题?

您可以从下载tarball

提取它,然后运行:

sudo python setup.py install

如果pip无法工作

如果您使用的是最新版本的Debian或Ubuntu Linux,您可以使用system package manager安装Beauty Soup:

$apt get安装python-bs4
(适用于python 2)

$apt get install python3-bs4
(用于Python 3)

您可以使用easy_install或pip进行安装

$ easy_install beautifulsoup4

$ pip install beautifulsoup4
如果您使用的是Anaconda分发,则可以使用此命令

conda install -c anaconda beautiful-soup

希望这有帮助。

使用
pip3安装更新pip——升级pip
。现在您应该可以安装beautifulsoup
pip3安装beautifulsoup4
。如果失败,请尝试:
python3-m pip安装beautifulsoup4

我尝试按照Jatmir的建议升级pip3,但它对我不起作用。最后,我在这篇文章中找到了另一种升级方法


我的MacBook也有同样的问题,我的问题如下。(2018/9月)

使用更新pip

pip3 install --upgrade pip
现在您应该可以安装beautifulsoup了

pip3 install beautifulsoup4
如果失败,请尝试:

python3 -m pip install beautifulsoup4

您使用的是什么操作系统?Mac OS High Sierra@StevenBlackHave您尝试过安装bs4的pip3吗?是的。@JatimirTry升级pip
pip3安装——升级pip
,您也可以尝试使用
python3-m pip安装beautifulsoup4安装。
pip3搜索beautifulsoup4
是否产生任何结果?我正在使用Mac OS。pip3无法找到版本4请遵循下面的链接,该链接将指导您解决问题。这是已接受答案的副本,应关闭。
python3 -m pip install beautifulsoup4