>>> 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中出现这个,醉了
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的环境。
好吧 有人知道python3.5该用哪个版本的bs
好吧 我是想说install有问题,结果贴上来的代吗没啥关系