codelucas / newspaper

newspaper3k is a news, full-text, and article metadata extraction in Python 3. Advanced docs:
https://goo.gl/VX41yK
MIT License
14.06k stars 2.11k forks source link

Install fails on Python 3.5.1 #239

Closed michaelmior closed 8 years ago

michaelmior commented 8 years ago

This seems to be due to an older nltk version. nltk 3.2.1 installs fine.

Collecting nltk==2.0.5 (from newspaper)
  Downloading nltk-2.0.5.tar.gz (954kB)
    100% |████████████████████████████████| 958kB 105kB/s 
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
    Extracting in /tmp/tmp_s3pa1pm
    Traceback (most recent call last):
      File "/tmp/pip-build-0cdit31h/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 20, in <module>
      File "/tmp/pip-build-0cdit31h/nltk/setup.py", line 23, in <module>
        distribute_setup.use_setuptools()
      File "/tmp/pip-build-0cdit31h/nltk/distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/tmp/pip-build-0cdit31h/nltk/distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "/tmp/pip-build-0cdit31h/nltk/distribute_setup.py", line 99, in _build_egg
        _extractall(tar)
      File "/tmp/pip-build-0cdit31h/nltk/distribute_setup.py", line 467, in _extractall
        self.chown(tarinfo, dirpath)
    TypeError: chown() missing 1 required positional argument: 'numeric_owner'
yprez commented 8 years ago

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

michaelmior commented 8 years ago

Whoops! Sorry about that. Didn't realize there was a separate package name. I should have read the documentation more carefully.

yprez commented 8 years ago

No problem, this happens very often... the 2 package names are confusing...

michaelmior commented 8 years ago

@yprez I think it would be helpful to just stick a big pip install newspaper3k at the top of the README. When I want to mess around with a library this is usually the first thing I do and it probably would have saved me from opening the issue in this case.

yprez commented 8 years ago

@michaelmior True, currently the installation instructions are somewhere far below in the readme...