question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with nltk dependency

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
steteleptacommented, Apr 23, 2017

This helped me too, thanks!

1reaction
yprezcommented, 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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sample usage for dependency - NLTK
Dependency Grammars. >>> from nltk. grammar import DependencyGrammar >>> from nltk. parse import ( ...
Read more >
NLTK Dependency issue on ADLA - python - Stack Overflow
I can deploy the nltk successfully on vertex and use it. Nltk is dependent on nltk_data and it searches for nltk_data in a...
Read more >
Installing nltk dependency - Python Forum
I have a python package for which nltk is a dependent package i.e. part of install_requires. My package has a dependency on wordnet...
Read more >
Dependency Resolution - pip documentation v22.3.1
Dependency Resolution#. pip is capable of determining and installing the dependencies of packages. The process of determining which version of a dependency ......
Read more >
DependencyGraph's tree(), TypeError: 'NoneType' object has ...
from nltk.parse import DependencyGraph ... tokens = nltk.word_tokenize(sent) ... The problem is that `dg.root` is None when dg.tree() is called:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found