Pip安装-“无效要求”

2024-05-23 19:46:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我在终端中运行以下命令:

pip install -r requirements-dev.txt

我得到以下错误:

Invalid requirement: 'nose=1.3.7'
= is not a valid operator. Did you mean == ?

requirements-dev.txt如下所示:

nose=1.3.7
pyflakes=0.9.2
pep8=1.5.6

为什么我会犯这个错误?我不太熟悉pip命令。


Tags: installpipdev命令txt终端is错误
1条回答
网友
1楼 · 发布于 2024-05-23 19:46:00

pip在其规范中没有为=指定任何行为,而是==(您想要的)称为version matching等。

供以后使用,版本8.1中当前可用的所有版本说明符都是:

version matching ==

Compatible release ~=

Version exclusion !=

Exclusive ordered comparison < , >

Inclusive ordered comparison <= , >=

Arbitrary equality ===

相关问题 更多 >