安装/使用Beautiful Soup 4的问题

时间:2018-03-10 14:15:15

标签: python beautifulsoup

我已经安装了Python 3.6,并尝试安装Beautiful Soup 4.经过几次问题bs4安装有效,但每次我尝试用from bs4 import beautifulsoup引用bs4安装时,都会出现以下错误:

ImportError: cannot import name 'beautifulsoup'

我已将PATH变量设置为指向python36-32文件夹,并且已在bs4中创建了python36-32\lib\site-packages文件夹。

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:1)

正确的导入方式是from bs4 import BeautifulSoup

如果查看the examples in the documentation,您可以看到如何使用它。

相关问题