python newspaper_newspaper3k

Get it now

Run ✅ pip3 install newspaper3k ✅

NOT ⛔ pip3 install newspaper ⛔

On python3 you must install newspaper3k, not newspaper. newspaper is our python2 library.

Although installing newspaper is simple with pip, you will

run into fixable issues if you are trying to install on ubuntu.

If you are on Debian / Ubuntu, install using the following:

Install pip3 command needed to install newspaper3k package:

$ sudo apt-get install python3-pip

Python development version, needed for Python.h:

$ sudo apt-get install python-dev

lxml requirements:

$ sudo apt-get install libxml2-dev libxslt-dev

For PIL to recognize .jpg images:

$ sudo apt-get install libjpeg-dev zlib1g-dev libpng12-dev

NOTE: If you find problem installing libpng12-dev, try installing libpng-dev.

Download NLP related corpora:

$ curl https://raw.githubusercontent.com/codelucas/newspaper/master/download_corpora.py | python3

Install the distribution via pip:

$ pip3 install newspaper3k

If you are on OSX, install using the following, you may use both homebrew or macports:

$ brew install libxml2 libxslt

$ brew install libtiff libjpeg webp little-cms2

$ pip3 install newspaper3k

$ curl https://raw.githubusercontent.com/codelucas/newspaper/master/download_corpora.py | python3

Otherwise, install with the following:

NOTE: You will still most likely need to install the following libraries via your package manager

PIL: libjpeg-dev zlib1g-dev libpng12-dev

lxml: libxml2-dev libxslt-dev

Python Development version: python-dev

$ pip3 install newspaper3k

$ curl https://raw.githubusercontent.com/codelucas/newspaper/master/download_corpora.py | python3


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部