pip install goose-extractor // SyntaxError: Missing parentheses in call to 'print'

今天在安装python的goose-extractor开发包时出现如下错误:

D:\Program Files (x86)\Python35-32\Scripts>pip install goose-extractor
Collecting goose-extractor
  Using cached goose-extractor-1.0.25.tar.gz
Collecting Pillow (from goose-extractor)
  Using cached Pillow-3.1.1-cp35-none-win32.whl
Collecting lxml (from goose-extractor)
  Using cached lxml-3.6.0.tar.gz
Collecting cssselect (from goose-extractor)
  Using cached cssselect-0.9.1.tar.gz
Collecting jieba (from goose-extractor)
  Using cached jieba-0.38.zip
Collecting beautifulsoup (from goose-extractor)
  Using cached BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-c1volnuc\beautifulsou
p\setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1
\AppData\Local\Temp\pip-build-c1volnuc\beautifulsoup\

--------------------------------------------------------------------------------------------------------------------------------

错误原因:

1、我安装的python版本是python-3.5.1-x86.exe

2、goose-extractor-1.0.25依赖BeautifulSoup-3.2.1

3、 BeautifulSoup-3.2.1是用python2.X.X开发的

4、听说python3.X.X系列和python2.X.X系列不兼容?我刚用python,对此还不甚了解,现在发现print不兼容。。。

-------------------------------------------------------------------------------------------------------------------------------------------------------------

解决方法:

1、安装python的版本选择python-2.7.11版本即可。

https://www.python.org/downloads/release/python-2711/

------------------------------------------------------------------------------------------------------------------------------------------------------------------

我安装成功时的信息如下:

...

Installing collected packages: Pillow, lxml, cssselect, jieba, beautifulsoup, nl
tk, goose-extractor
  Running setup.py install for cssselect
  Running setup.py install for jieba
  Running setup.py install for beautifulsoup
  Running setup.py install for nltk
  Running setup.py install for goose-extractor
Successfully installed Pillow-3.1.1 beautifulsoup-3.2.1 cssselect-0.9.1 goose-extractor-1.0.25 jieba-0.38 lxml-3.6.0 nltk-3.2







  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

friendan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值