同时使用jupyter笔记本使用代码
from bs4 import BeautifulSoup
print ("BeautifulSoup version:%6.6s" %BeautifulSoup.__version__)
我收到了这个错误
AttributeError:类型对象'BeautifulSoup'没有属性'version'
我使用python setup.py install安装了bs4 . 它在安装中显示“c:\ users ... \ anaconda3 \ lib \ site-packages \ beautifulsoup4-4.4.1-py3.5.egg”
1 回答
对于
BeautifulSoup
版本4,你应该这样做: