0

我正在尝试在我的 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

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

4

2 回答 2

3

发现了问题,所以在 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'

这对我有用。

于 2016-09-02T07:06:41.137 回答