我尝试通过pip安装套管,但失败了。
这是日志。
从命令python setup.py egg_info完成输出:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-J2gFYC/boilerpipe/setup.py", line 27, in <module>
download_jars(datapath=DATAPATH)
File "/tmp/pip-build-J2gFYC/boilerpipe/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 1727, in gzopen
**kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1705, in taropen
return cls(name, mode, fileobj, **kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1574, in __init__
self.firstmember = self.next()
File "/usr/lib/python2.7/tarfile.py", line 2334, in next
raise ReadError("empty file")
tarfile.ReadError: empty file
----------------------------------------
命令&#34; python setup.py egg_info&#34;在/ tmp / pip-build-J2gFYC / boilerpipe
中出现错误代码1失败答案 0 :(得分:1)
有时候应该下载GZ文件的URL返回404.在这种情况下安装samppipe的最佳方法是:
git clone https://github.com/ptwobrussell/python-boilerpipe.git
tgz_url = 'https://boilerpipe.googlecode.com/files/boilerpipe-{0}-bin.tar.gz'.format(version)
https://code.google.com/archive/p/boilerpipe/downloads
tgz_url='https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/boilerpipe/boilerpipe-1.2.0-bin.tar.gz'