codelucas / newspaper

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

Can not install with Python 3.6 #375

Closed vitaly-zdanevich closed 7 years ago

vitaly-zdanevich commented 7 years ago

I have success experience of pip3 install newspaper under Python 3.5 but under 3.6 I see this:

Collecting newspaper
  Downloading newspaper-0.0.9.8.tar.gz (248kB)
    100% |████████████████████████████████| 256kB 1.9MB/s
Collecting beautifulsoup4==4.3.2 (from newspaper)
  Downloading beautifulsoup4-4.3.2.tar.gz (143kB)
    100% |████████████████████████████████| 143kB 2.9MB/s
Collecting Pillow==2.5.1 (from newspaper)
  Downloading Pillow-2.5.1.zip (6.9MB)
    100% |████████████████████████████████| 6.9MB 191kB/s
Requirement already satisfied: PyYAML==3.11 in /usr/local/lib/python3.6/site-packages (from newspaper)
Collecting cssselect==0.9.1 (from newspaper)
  Downloading cssselect-0.9.1.tar.gz
Collecting lxml==3.3.5 (from newspaper)
  Downloading lxml-3.3.5.tar.gz (3.5MB)
    100% |████████████████████████████████| 3.5MB 368kB/s
Collecting nltk==2.0.5 (from newspaper)
  Downloading nltk-2.0.5.tar.gz (954kB)
    100% |████████████████████████████████| 962kB 1.3MB/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_wbeq6dk
    Traceback (most recent call last):
      File "/private/tmp/pip-build-ui_btdm3/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 "/private/tmp/pip-build-ui_btdm3/nltk/setup.py", line 23, in <module>
        distribute_setup.use_setuptools()
      File "/private/tmp/pip-build-ui_btdm3/nltk/distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/private/tmp/pip-build-ui_btdm3/nltk/distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "/private/tmp/pip-build-ui_btdm3/nltk/distribute_setup.py", line 99, in _build_egg
        _extractall(tar)
      File "/private/tmp/pip-build-ui_btdm3/nltk/distribute_setup.py", line 467, in _extractall
        self.chown(tarinfo, dirpath)
    TypeError: chown() missing 1 required positional argument: 'numeric_owner'

macOS

codelucas commented 7 years ago

This is a known problem @vitaly-zdanevich:

Please run pip3 install newspaper3k

codelucas commented 7 years ago

There are so many bug-reports of this exact problem at this point now that I feel we should fix the naming so newspaper refers to newspaper3k : (

codelucas commented 7 years ago

Let me know if it works for you!

vitaly-zdanevich commented 7 years ago

Oh, I forgot about 3k... Thank you, installing is correct (with sudo)