安裝圖解.png
安裝bs4 pip install bs4,運行程序后發(fā)現(xiàn)已經安裝了bs4。
python打開交互式窗口,導入BeautifulSoup發(fā)生錯誤:ImportError: cannot import name 'HTMLParseError'
經查詢后得知:BeautifulSoup在4.4.0以前的版本不支持Python3.5,所以我們需要把我們的BeautifulSoup升級到4.4.0版本以上就可以使用了.
升級方法:
pip install --upgrade beautifulsoup4