Python 锅炉管安装问题
Python boilerpipe installation issue
我正在尝试在我的 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
这些是我正在执行的步骤:
- pip 安装 JPype1
- pip 安装 charade
- git克隆
https://github.com/misja/python-boilerpipe.git
- cd python-锅炉管
- sudo python setup.py 安装
发现了问题,所以在 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'
这对我有用。
您可以使用任何类似的替代方案之一,例如尝试 jusText
pip install justext
以下是一些备选方案:
- http://sourceforge.net/projects/webascorpus/?source=navbar
- https://github.com/jiminoc/goose
- https://github.com/grangier/python-goose
- https://github.com/miso-belica/readability.py
- https://github.com/dcramer/decruft
- https://github.com/FeiSun/ContentExtraction
- https://github.com/JalfResi/justext
- https://github.com/andreypopp/extracty/tree/master/justext
- https://github.com/dreamindustries/jaws/tree/master/justext
- https://github.com/says/justext https://github.com/chbrown/justext
- https://github.com/says/justext-app
我正在尝试在我的 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
这些是我正在执行的步骤:
- pip 安装 JPype1
- pip 安装 charade
- git克隆 https://github.com/misja/python-boilerpipe.git
- cd python-锅炉管
- sudo python setup.py 安装
发现了问题,所以在 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'
这对我有用。
您可以使用任何类似的替代方案之一,例如尝试 jusText
pip install justext
以下是一些备选方案:
- http://sourceforge.net/projects/webascorpus/?source=navbar
- https://github.com/jiminoc/goose
- https://github.com/grangier/python-goose
- https://github.com/miso-belica/readability.py
- https://github.com/dcramer/decruft
- https://github.com/FeiSun/ContentExtraction
- https://github.com/JalfResi/justext
- https://github.com/andreypopp/extracty/tree/master/justext
- https://github.com/dreamindustries/jaws/tree/master/justext
- https://github.com/says/justext https://github.com/chbrown/justext
- https://github.com/says/justext-app