猜測:應該是vscode沒有找到IDLE安裝的bs4路徑,或者沒有成功加載
方案1
1、重新下載bs4,將其解壓到所需工作的目錄下
2、重啟vscode
方案2
1、在VScode終端安裝bs4 :pip install beautifulsoup4
2、將settings.json文件內容
刪除重新寫一遍E:\\Python3.6\\python.exe
不需更改任何內容
{ "python.pythonPath": "E:\\Python3.6\\python.exe" }
不需更改任何內容
3、重啟vscode
附
bs4下載地址:https://www.crummy.com/software/BeautifulSoup/bs4/download/4.8/