Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'boilerpipe' #1

Open
shawnmjones opened this issue Aug 28, 2019 · 2 comments

Comments

@shawnmjones
Copy link

commented Aug 28, 2019

Environment:

  • Python 3.7.4
  • macOS 10.14.6 (18G87)
  • numpy 1.17.1
  • scipy 1.3.1
  • virtualenv
  • ipython

Issue:

After installing NwalaTextUtils, I tried to run the usage example form the README.md inside ipython and got a ModuleNotFoundError.

In [2]: from NwalaTextUtils.textutils import prlGetTxtFrmURIs
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-70df1e81a3a3> in <module>
----> 1 from NwalaTextUtils.textutils import prlGetTxtFrmURIs

~/.virtualenvs/nwala/lib/python3.7/site-packages/NwalaTextUtils/textutils.py in <module>
      4 import time
      5
----> 6 from boilerpipe.extract import Extractor
      7 from bs4 import BeautifulSoup
      8 from multiprocessing import Pool

ModuleNotFoundError: No module named 'boilerpipe'

A search on pypi.org shows 7 different boilerpipe Python libraries. I was uncertain as to which one I needed. I tried “pip install boilerpipe”, but that failed to install. I next tried “pip install boilerpipe3” and that installed fine. After that I was able to continue with the example and successfully produced a JSON file.

I have two suggestions to fix this:

  • put the name of the correct boilerpipe library into setup.py
  • if there are problems with doing that, put the name of the correct boilerpipe library into the README and note that this must be installed prior to use

@shawnmjones shawnmjones added the bug label Aug 28, 2019

@shawnmjones

This comment has been minimized.

Copy link
Author

commented Aug 29, 2019

I just tried this using the official Python Docker image python:3.7.3-stretch and had the same problem. It does not appear to just be macOS or my specific configuration.

Docker environment for comparison:

  • Python 3.7.3
  • Linux 97ee5bc0586e 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux
  • numpy 1.17.1
  • scipy 1.3.1
  • system Python, not virtualenv
  • ipython 7.7.0

My macOS environment is also running ipython 7.7.0.

@shawnmjones

This comment has been minimized.

Copy link
Author

commented Aug 29, 2019

Pip seems to be ignoring the dependency_links section of setup.py.

dependency_links=['http://github.com/misja/python-boilerpipe/tarball/master#egg=python-boilerpipe']

According to https://stackoverflow.com/questions/12518499/pip-ignores-dependency-links-in-setup-py it seems like dependency_links was deprecated in 2017 and is likely removed by now.

Running the install with --process-dependency-links within the Docker environment produces an error.

root@591d96c5d095:/# pip install NwalaTextUtils --process-dependency-links

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --process-dependency-links
@shawnmjones shawnmjones referenced a pull request that will close this issue Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.