Forums

Error installing Boilerpipe

I need Boilerpipe in my service, but after pip install boilerpipe

I get the error below... Does this have to do with the fact that boilerpipe uses jar files?

Downloading/unpacking boilerpipe
  Getting page https://pypi.python.org/simple/boilerpipe/
  URLs to search for versions for boilerpipe:
  * https://pypi.python.org/simple/boilerpipe/
  Analyzing links from page https://pypi.python.org/simple/boilerpipe/
    Found link https://pypi.python.org/packages/source/b/boilerpipe/boilerpipe-1.2.0.0.tar.gz#md5=960f9e725366b32cd6713f5498e069fb (from https://pypi.python.org/simple/boilerpipe/), version: 1.2.0.0
  Downloading from URL https://pypi.python.org/packages/source/b/boilerpipe/boilerpipe-1.2.0.0.tar.gz#md5=960f9e725366b32cd6713f5498e069fb (from https://pypi.python.org/simple/boilerpipe/)
  Running setup.py (path:/tmp/pip_build_capsence/boilerpipe/setup.py) egg_info for package boilerpipe
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_capsence/boilerpipe/setup.py", line 27, in <module>
        download_jars(datapath=DATAPATH)
      File "/tmp/pip_build_capsence/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 1729, in gzopen
        raise ReadError("not a gzip file")
    tarfile.ReadError: not a gzip file
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_capsence/boilerpipe/setup.py", line 27, in <module>

    download_jars(datapath=DATAPATH)

  File "/tmp/pip_build_capsence/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 1729, in gzopen

    raise ReadError("not a gzip file")

tarfile.ReadError: not a gzip file

----------------------------------------
Cleaning up...
  Removing temporary dir /tmp/pip_build_capsence...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_capsence/boilerpipe
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/commands/install.py", line 274, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 1215, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 321, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.2-py2.7.egg/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_capsence/boilerpipe

[edited by admin for formatting]

I tried: pip install --user boilerpipe

You normally need the '--user' to do your own installs.

Boilerpipe seems to need Java, which I believe isn't supported in PA, judging by a search of these forums.

Jim

I'm afraid Jim is right, we don't currently support Java... Could you use some kind of alternative? Roll your own using BeautifulSoup, or maybe Readability for Python?

Well I used BeautifulSoup but it is to complicated, boilerpipe is simple and does a very good job without settings. But I'll have a look at Readability for Python.

Thanks

Hi ,

If you can work with Python3 then you can use

pip3 install --user boilerpipe-py3 It's getting installed on PA.

Let me know, if you already have found solution with python2

All the best.