Comments (4)
Can you try the installation with python3? That's what we have been developing on recently. You can get python3 from the official website or via homebrew. After python3 has been installed, simply use the corresponding pip command, most likely:
sudo pip3 install news-please
from news-please.
I still get the same error (error code 1). Here is the whole output:
Ians-MacBook-Air:~ ianmackerracher$ sudo pip3 install news-please
Password:
The directory '/Users/ianmackerracher/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/ianmackerracher/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting news-please
Downloading news-please-1.0.25.tar.gz (46kB)
100% |████████████████████████████████| 51kB 1.0MB/s
Collecting Scrapy>=1.1.0 (from news-please)
Downloading Scrapy-1.3.2-py2.py3-none-any.whl (239kB)
100% |████████████████████████████████| 245kB 2.0MB/s
Collecting PyMySQL>=0.7.9 (from news-please)
Downloading PyMySQL-0.7.10-py2.py3-none-any.whl (78kB)
100% |████████████████████████████████| 81kB 2.6MB/s
Collecting hjson>=1.5.8 (from news-please)
Downloading hjson-2.0.2.tar.gz
Collecting elasticsearch>=2.4 (from news-please)
Downloading elasticsearch-5.2.0-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 6.5MB/s
Collecting beautifulsoup4>=4.5.1 (from news-please)
Downloading beautifulsoup4-4.5.3-py3-none-any.whl (85kB)
100% |████████████████████████████████| 92kB 5.1MB/s
Collecting readability-lxml>=0.6.2 (from news-please)
Downloading readability-lxml-0.6.2.tar.gz
Collecting langdetect>=1.0.7 (from news-please)
Downloading langdetect-1.0.7.zip (998kB)
100% |████████████████████████████████| 1.0MB 1.1MB/s
Collecting python-dateutil>=2.4.0 (from news-please)
Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 929kB/s
Collecting plac>=0.9.6 (from news-please)
Downloading plac-0.9.6-py2.py3-none-any.whl
Collecting newspaper3k (from news-please)
Downloading newspaper3k-0.1.9.tar.gz (182kB)
100% |████████████████████████████████| 184kB 3.1MB/s
Collecting queuelib (from Scrapy>=1.1.0->news-please)
Downloading queuelib-1.4.2-py2.py3-none-any.whl
Collecting pyOpenSSL (from Scrapy>=1.1.0->news-please)
Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 3.2MB/s
Collecting parsel>=1.1 (from Scrapy>=1.1.0->news-please)
Downloading parsel-1.1.0-py2.py3-none-any.whl
Collecting w3lib>=1.15.0 (from Scrapy>=1.1.0->news-please)
Downloading w3lib-1.17.0-py2.py3-none-any.whl
Collecting Twisted>=13.1.0 (from Scrapy>=1.1.0->news-please)
Downloading Twisted-17.1.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 378kB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'incremental' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
No local packages or working download links found for incremental>=16.10.1
Traceback (most recent call last):
File "", line 1, in
File "/private/tmp/pip-build-r1b5u0a2/Twisted/setup.py", line 21, in
setuptools.setup(**_setup"getSetupArgs")
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 315, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 1122, in best_match
return self.obtain(req, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 1134, in obtain
return installer(requirement)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-r1b5u0a2/Twisted/
#####Ignoring already installed #########
Ians-MacBook-Air:~ ianmackerracher$ pip3 install --ignore-installed news-please
Collecting news-please
Using cached news-please-1.0.25.tar.gz
Collecting Scrapy>=1.1.0 (from news-please)
Using cached Scrapy-1.3.2-py2.py3-none-any.whl
Collecting PyMySQL>=0.7.9 (from news-please)
Using cached PyMySQL-0.7.10-py2.py3-none-any.whl
Collecting hjson>=1.5.8 (from news-please)
Using cached hjson-2.0.2.tar.gz
Collecting elasticsearch>=2.4 (from news-please)
Using cached elasticsearch-5.2.0-py2.py3-none-any.whl
Collecting beautifulsoup4>=4.5.1 (from news-please)
Using cached beautifulsoup4-4.5.3-py3-none-any.whl
Collecting readability-lxml>=0.6.2 (from news-please)
Using cached readability-lxml-0.6.2.tar.gz
Collecting langdetect>=1.0.7 (from news-please)
Using cached langdetect-1.0.7.zip
Collecting python-dateutil>=2.4.0 (from news-please)
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting plac>=0.9.6 (from news-please)
Using cached plac-0.9.6-py2.py3-none-any.whl
Collecting newspaper3k (from news-please)
Using cached newspaper3k-0.1.9.tar.gz
Collecting parsel>=1.1 (from Scrapy>=1.1.0->news-please)
Using cached parsel-1.1.0-py2.py3-none-any.whl
Collecting lxml (from Scrapy>=1.1.0->news-please)
Using cached lxml-3.7.3.tar.gz
Collecting queuelib (from Scrapy>=1.1.0->news-please)
Using cached queuelib-1.4.2-py2.py3-none-any.whl
Collecting PyDispatcher>=2.0.5 (from Scrapy>=1.1.0->news-please)
Using cached PyDispatcher-2.0.5.tar.gz
Collecting Twisted>=13.1.0 (from Scrapy>=1.1.0->news-please)
Using cached Twisted-17.1.0.tar.bz2
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'incremental' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
No local packages or working download links found for incremental>=16.10.1
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/gy/5xt04_452z791v1qjs1yzxkh0000gn/T/pip-build-4hzh_d2s/Twisted/setup.py", line 21, in
setuptools.setup(**_setup"getSetupArgs")
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 315, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 1122, in best_match
return self.obtain(req, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/init.py", line 1134, in obtain
return installer(requirement)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gy/5xt04_452z791v1qjs1yzxkh0000gn/T/pip-build-4hzh_d2s/Twisted/
from news-please.
Ah, I remember the most recent error you got. I fixed that with the help of this answer http://stackoverflow.com/a/29751768/1455800
from news-please.
I found out that the issue was because the package Scrapy (a dependency of news-please) couldn't be installed because of a problem with the SSL certificates. As stated here https://bugs.python.org/issue28150 in previous versions of python Apple supplied the OpenSSL packages but does not anymore.
Running the command pip install certifi
and then pip install Scrapy
installed Scrapy without a problem, after which news-please could be installed regularly.
from news-please.
Related Issues (20)
- news-please at background HOT 2
- Configure options to optimize the crawling and extraction process
- Proxy Server configuration (HttpProxyMiddleware) HOT 4
- ModuleNotFoundError: No module named 'newsplease' HOT 3
- Get only the recursive list of URLs using the Library mode HOT 2
- Failed to build for python 3.11 HOT 3
- DateFilter is never used HOT 7
- Specify more recent awscli dependency to avoid dependency resolution issues HOT 8
- Error : You must `download()` an article first! HOT 2
- Scrape by Domain HOT 1
- NewsPlease.from_urls behaves inconsistently in situations where a url results in 404
- Newer version of ElasticSearch API changed a lot
- Unable to Crawl and Save PDF files HOT 1
- Change Crawlers to RecursiveCrawler with as a library and store to Mongodb HOT 1
- can not extract main text. HOT 1
- Implement user agent functionality similar to News Paper 3k
- maintext article attribute length limitation HOT 1
- Reuter news scrip failed HOT 1
- ImportError: libpq.so.5: cannot open shared object file: No such file or directory HOT 1
- Unable to change URLS from example URLS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from news-please.