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

Problem with nltk dependency #244

Closed
ghost opened this issue May 10, 2016 · 5 comments
Closed

Problem with nltk dependency #244

ghost opened this issue May 10, 2016 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented May 10, 2016

Working in a virtualenv, python 3.4.3.

Running pip install newspaper gives me:

 error: invalid command 'bdist_egg'
    /tmp/pip-build-d_0h2zij/nltk/distribute-0.6.21-py3.4.egg
    Traceback (most recent call last):
      File "/tmp/pip-build-d_0h2zij/nltk/distribute_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-d_0h2zij/nltk/setup.py", line 23, in <module>
        distribute_setup.use_setuptools()
      File "/tmp/pip-build-d_0h2zij/nltk/distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/tmp/pip-build-d_0h2zij/nltk/distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "/tmp/pip-build-d_0h2zij/nltk/distribute_setup.py", line 116, in _build_egg
        raise IOError('Could not build the egg.')
    OSError: Could not build the egg.
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-d_0h2zij/nltk/

I have made sure to update setuptools in both the virtualenv and the system-wide installation, no joy.

Any reason why the install script isn't finding it? Curiously, nltk installs just fine by itself, but evidently the version that newspaper requires isn't installing? Am I understanding that correctly?

@yprez yprez added the question label May 10, 2016
@yprez
Copy link
Collaborator

yprez commented May 10, 2016

I think you're installing the wrong version of newspaper... the Python 3 version is newspaper3k.
Can you try: pip install newspaper3k?

@ghost
Copy link
Author

ghost commented May 10, 2016

Gnarly, thanks. That was it.

This is OT, but why would it throw an import error from w/rspct to setuptools?

@yprez
Copy link
Collaborator

yprez commented May 10, 2016

Uhm, not really sure, I just remember there was some issue with installing the latest nltk on python2, so that's the first thing that fails...

@ghost
Copy link
Author

ghost commented May 11, 2016

Well thanks for steering me forward

@stetelepta
Copy link

This helped me too, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants