在mac上安装beautifulsoup 4.6 for python 3.6的问题

时间:2017-07-23 11:53:45

标签: python macos python-2.7 python-3.x beautifulsoup

我在2012年macbook air上安装beautifulsoup 4.6 for python 3.6时遇到问题。由于某种原因,beautiulsoup在预装在mac中的python 2.7上运行得很好,但是当我尝试使用/安装它来进行python 3.6时,它根本就不会这样做。有什么方法可以绕过内置的python 2.7,并安装3.6的包?

下面是我尝试运行代码时Python 3.6中的错误消息的图片

>>> from bs4 import beautifulsoup

picture of the error message in python 3.6

1 个答案:

答案 0 :(得分:0)

只需为python3

安装它

pip3 install bs4

如果那不起作用,那么你应该提供更多信息。