我刚刚设置了beautifulsoup4-4.1.0并将pip升级到版本9.0.1。 当我这样写:
from bs4 import BeautifulSoup
发生错误:
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
from bs4 import BeautifulSoup
File "D:\Program Files (x86)\Python35-32\lib\site-packages\bs4\__init__.py", line 35, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "D:\Program Files (x86)\Python35-32\lib\site-packages\bs4\builder\__init__.py", line 7, in <module>
from bs4.element import (
ImportError: cannot import name 'HTMLAwareEntitySubstitution'
我该怎么办?非常感谢。