【问题标题】:Python boilerpipe installation issuePython锅炉管道安装问题
【发布时间】:2016-09-01 12:16:23
【问题描述】:

我正在尝试在我的 Ubuntu 14 中插入 Python Boilerpipe。它失败并出现以下错误:

 Traceback (most recent call last):
  File "setup.py", line 27, in <module>
    download_jars(datapath=DATAPATH)
  File "setup.py", line 21, in download_jars
    tar = tarfile.open(tgz_name, mode='r:gz')
  File "/usr/lib/python2.7/tarfile.py", line 1678, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/usr/lib/python2.7/tarfile.py", line 1730, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file

这些是我正在遵循的步骤:

【问题讨论】:

    标签: python ubuntu-14.04 boilerpipe


    【解决方案1】:

    发现了问题,所以他们在 setup.py 中寻找锅炉管道 tar 文件。他们从 googlecode 下载它,现在已经不存在了。

    def download_jars(datapath, version=boilerpipe_version):
        tgz_url = 'https://boilerpipe.googlecode.com/files/boilerpipe-{0}- bin.tar.gz'.format(version)
    

    所以我用新的文件位置替换了同一行:

    tgz_url='https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/boilerpipe/boilerpipe-1.2.0-bin.tar.gz'
    

    这对我有用。

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      相关资源
      最近更新 更多