Python 尝试使用 pip 安装 'request' 包时出错

Python error when attempting to install 'request' package using pip

我在尝试安装 'request' Python 包 运行ning 命令时收到以下错误消息 pip install request:

ERROR: Could not find a version that satisfies the requirement request (from versions: none) ERROR: No matching distribution found for request

采取的故障排除步骤:

附加信息:

PyPI 服务器上似乎也不再存在该包。如果您 Google 搜索“pip install request”,您应该能够看到 request PyPI project 已编入索引,如果您单击它,您将收到错误代码 404。

有什么我遗漏的吗?或者有没有其他方法可以安装 'request' 包?其他地方有吗?

编辑(用于用例上下文和示例):我正在尝试通过 Linux Manjaro 安装 macOS 虚拟机。我从 5:28 标记处开始关注 this Passthrough Post article. Under the "Basic Setup" section of the article, Python packages 'click' and 'request' are prerequisites dependencies. So the command would be pip install click request. If you see this video guide,他能够 运行 成功执行该命令并安装 'request' 软件包。

此外,这是从 Flask 导入的屏幕截图示例:Request package imported from Flask example.jpeg

我想你想安装的是“requests”包

据我了解...

the article 中有一个 错字。它说要安装 request 它实际上应该说 requests (复数,最后有一个 s ).截屏视频的作者似乎犯了同样的错误,我只能假设这对他们没有影响,因为他们可能不知何故已经预先在他们的 [=49= 中安装了 requests ]环境。

这可以通过阅读the git repository linked in the article. In particular the following lines中的实际代码来确认:

import click
import requests

更新:

似乎(至少在某个时间点)request(末尾没有 s)包包含一些恶意软件: