符號有問題
>>> 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中出現這個,醉了
2017-05-04
你在嘗試用版本2運行版本3下的Beautiful Soup。
試試 python3+回車鍵進入python的編輯環境。直接用python+回車,會搜索path變量最先找到的可執行文件,如果你python2的環境變量在3前面,python+回車進入的是2的環境。
2017-04-06
好吧 有人知道python3.5該用哪個版本的bs
2017-04-05
好吧 我是想說install有問題,結果貼上來的代嗎沒啥關系