亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

符號有問題

>>> from bs4 import beautifulsoup

Traceback (most recent call last):

? File "<pyshell#0>", line 1, in <module>

? ? from bs4 import beautifulsoup

? File "C:\Users\ONEPIECE\AppData\Local\Programs\Python\Python35-32\beautifulsoup4-4.5.1.tar\beautifulsoup4-4.5.1\bs4\__init__.py", line 53

? ? 'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^

SyntaxError: invalid syntax

安裝beautifulsoup中出現這個,醉了

正在回答

3 回答

You?are?trying?to?run?the?Python?2?version?of?Beautiful?Soup?under?Python?3

你在嘗試用版本2運行版本3下的Beautiful Soup。

試試 python3+回車鍵進入python的編輯環境。直接用python+回車,會搜索path變量最先找到的可執行文件,如果你python2的環境變量在3前面,python+回車進入的是2的環境。

0 回復 有任何疑惑可以回復我~

好吧 有人知道python3.5該用哪個版本的bs

0 回復 有任何疑惑可以回復我~

好吧 我是想說install有問題,結果貼上來的代嗎沒啥關系

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
python遇見數據采集
  • 參與學習       59664    人
  • 解答問題       209    個

本教程讓你初步掌握Python進行數據采集,創造屬于你的價值

進入課程

符號有問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號