问题:集体智慧编程-第二章-安装pydelicious报错

安装 feedparser-5.2.1.tar.bz2
下载地址https://files.pythonhosted.org/packages/91/d8/7d37fec71ff7c9dbcdd80d2b48bcdd86d6af502156fc93846fb0102cb2c4/feedparser-5.2.1.tar.bz2

cd进入终端:
F:\Downloads\feedparser-5.2.1>cd F:\Downloads\feedparser-5.2.1\feedparser-5.2.1

F:\Downloads\feedparser-5.2.1\feedparser-5.2.1>python setup.py install

 

安装 pydelicious

下载地址 https://files.pythonhosted.org/packages/d7/42/0ef959fa6b686862b02ae343e58ce7764bbf8e7c37de1eeaa7e6418fd8d9/pydelicious-0.6.1.tar.gz

该脚本是针对python2的,需要使用python自带的2to3.py转为python3适用

 把2to3.py(python的scripts内)复制到pydelicious的setup.py目录

 

 

终端运行2to3.py

python 2to3.py -w F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1\pydelicious\__init__.py

 报错:

F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1>python 2to3.py -w F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1\pydelicious\__init__.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't parse F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1\pydelicious\__init__.py: ParseError: bad input: type=22, value='=', context=('', (46, 59))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1\pydelicious\__init__.py: ParseError: bad input: type=22, value='=', context=('', (46, 59))

 

 

 

执行setup

python F:\Downloads\pydelicious-0.6.1\pydelicious-0.6.1\setup.py install

 

posted @ 2020-08-27 19:07  求进步的娃  阅读(172)  评论(0编辑  收藏  举报