符號(hào)有問(wèn)題
>>> 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中出現(xiàn)這個(gè),醉了
2017-05-04
你在嘗試用版本2運(yùn)行版本3下的Beautiful Soup。
試試 python3+回車鍵進(jìn)入python的編輯環(huán)境。直接用python+回車,會(huì)搜索path變量最先找到的可執(zhí)行文件,如果你python2的環(huán)境變量在3前面,python+回車進(jìn)入的是2的環(huán)境。
2017-04-06
好吧 有人知道python3.5該用哪個(gè)版本的bs
2017-04-05
好吧 我是想說(shuō)install有問(wèn)題,結(jié)果貼上來(lái)的代嗎沒啥關(guān)系