• python35安装beautifulsoup报错 'You are trying to run the Python 2 version of Beautiful Soup under Python 3 . This will not work

    2016/02/01 拳拳 4 评论  , 

from bs4 import BeautifulSoup

Traceback (most recent call last):

File “”, line 1, in

File “C:Python35beautifulsoup4-4.4.1bs4__init__.py”, line 48

‘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是最新版4.4.4.1版本。我是下载之后解压到python35文件夹中,然后用命令行 python setup.py install方式安装的。度娘搜搜也没搜到答案

2 收藏


直接登录
最新评论