我尝试了下面的命令
pip3 install geograpy
警告来了
WARNING! You are attempting to install newspaper's python2 repository on python3. PLEASE RUN `$ pip3 install newspaper3k` for python3 or `$ pip install newspaper` for python2
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ulhaaak8/newspaper/
我试过之后
pip3 install newspaper3k
它成功安装
在我再次尝试上一个命令后。但同样的错误又来了。
geograpy的setup.py
declares newspaper
as a dependency。这是setup.py
中的一个错误;对于Python 3,依赖项必须是newspaper3k
。也许Python 3还有其他问题。
使用Python 3修复安装的There is a pull request。
我在我的Ubuntu系统中将默认的python版本(2.7)更改为3.6。之后问题解决了。去这个link