python - 找不到满足lxml新闻-请要求的版本

标签 python text beautifulsoup lxml

我正在尝试安装一个名为 news-please 的 Python 包。该软件包已在 PyPi 上以及 Github .

当我按照 Github 页面上所示执行 pip install news-please 时,它会显示以下内容:

Collecting news-please
  Using cached news-please-1.1.48.tar.gz
Collecting Scrapy>=1.1.0 (from news-please)
  Using cached Scrapy-1.4.0-py2.py3-none-any.whl
Collecting PyMySQL>=0.7.9 (from news-please)
  Using cached PyMySQL-0.7.11-py2.py3-none-any.whl
Collecting hjson>=1.5.8 (from news-please)
  Using cached hjson-2.0.7.tar.gz
Collecting elasticsearch>=2.4 (from news-please)
  Using cached elasticsearch-5.4.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): 
beautifulsoup4>=4.3.2 in c:\users\[my name]\anaconda3\lib\site-packages 
(from news-please)
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
Requirement already satisfied (use --upgrade to upgrade): python-
dateutil>=2.4.0 in c:\users\[my name]\anaconda3\lib\site-packages (from 
news-please)
Requirement already satisfied (use --upgrade to upgrade): plac>=0.9.6 in 
c:\users\[my name]\anaconda3\lib\site-packages (from news-please)
Collecting dotmap>=1.2.17 (from news-please)
  Using cached dotmap-1.2.17.tar.gz
Collecting PyDispatcher>=2.0.5 (from news-please)
  Using cached PyDispatcher-2.0.5.tar.gz
Collecting warcio>=1.3.3 (from news-please)
  Using cached warcio-1.3.4-py2.py3-none-any.whl
Collecting ago>=0.0.9 (from news-please)
  Using cached ago-0.0.9.tar.gz
Collecting newspaper3k (from news-please)
  Using cached newspaper3k-0.2.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pywin32>=220 in 
c:\users\[my name]\anaconda3\lib\site-packages (from news-please)
Collecting lxml>=3.35 (from news-please)
 Could not find a version that satisfies the requirement lxml>=3.35 (from 
 news-please) (from versions: 0.9, 0.9.1, 0.9.2, 1.0b0, 1.0, 1.0.1, 1.0.2, 
 1.0.3, 1.0.4, 1.1a0, 1.1b0, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.3b0, 1.3, 
 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 2.0a1, 2.0a2, 2.0a3, 2.0a4, 2.0a5, 
 2.0a6, 2.0b1, 2.0b2, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 
 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.1a1, 2.1b1, 2.1b2, 2.1b3, 2.1, 2.1.1, 
 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.2a1, 2.2b1, 2.2b2, 2.2b3, 2.2b4, 2.2, 2.2.1, 
 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.3b1, 2.3, 2.3.1, 2.3.2, 
 2.3.3, 2.3.4, 2.3.5, 2.3.6, 3.0, 3.0.1, 3.0.2, 3.1b1, 3.1.0, 3.1.1, 3.1.2, 
 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0b1, 3.3.0b2, 3.3.0b3, 
 3.3.0b4, 3.3.0b5, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.4.0, 
 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.5.0b1, 3.5.0, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 
 3.6.4, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.8.0)
No matching distribution found for lxml>=3.35 (from news-please)
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' 
command.

现在的问题是它说找不到满足要求 lxml >=3.35 的版本。

我已经有一个高于 3.35 的 lxml 版本。当我执行“pip show lxml”时,它告诉我当前的版本是 3.8.0。

如何解决这个问题?

最佳答案

如果您已经满足these dependencies :

pywin32 >=220 ; sys_platform == 'win32'
lxml >=3.35 ; sys_platform == 'win32'
Scrapy>=1.1.0
PyMySQL>=0.7.9
hjson>=1.5.8
elasticsearch>=2.4
beautifulsoup4>=4.3.2
readability-lxml>=0.6.2
newspaper3k>=0.1.7 ; python_version >= '3.0'
newspaper>=0.0.9.8 ; python_version == '2.7'
langdetect>=1.0.7
python-dateutil>=2.4.0
plac>=0.9.6
future>=0.16.0 ; python_version == '2.7'
PyDispatcher>=2.0.5
dotmap>=1.2.17
warcio>=1.3.3
ago>=0.0.9

那么你可以使用

pip install --no-deps -U news-please

要让 pip install news,请不要依赖项。

关于python - 找不到满足lxml新闻-请要求的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44910404/

相关文章:

python - python CSV 和 JSON 文件的编码/解码故障排除

c++ - 用于保护文本的最强加密是什么?

ios - 如何在使用 xcode 开发 ios 应用程序时读取文本文件

text - 如何创建 4 个类别的文本分类训练数据

python - 如何获取包含特定文本的 <span> 标签的父级

python - 导入错误: No module named bs4 in django

python - 如何根据Python中的起始行和结束行获取类的范围?

python - 将密码存储在变量中是否危险?

python - 即使页面存在也获取状态代码 404

python - 网络安全 : Worst-Case Situation