ERROR: typer 0.3.2 has requirement click<7.2.0,>=7.1.1, but you'll have click 8.0.3 which is incompatible

ERROR: typer 0.3.2 has requirement click<7.2.0,>=7.1.1, but you'll have click 8.0.3 which is incompatible

我有 requirements.txt 个文件要安装 python 个软件包

当我在 Dockerfile 中执行 RUN pip3 install --no-cache-dir -r requirements.txt 时,出现上述错误

谁能解释一下它在说什么

fastapi==0.68.2
uvicorn==0.15.0
nltk==3.6.2
pydantic>=1.2.0,<2.0.0
requests==2.26.0
dill==0.3.4
numpy==1.19.5
spacy==3.1.0
torch==1.9.0
transformers==4.11.3
sentence-splitter==1.4
gunicorn==20.0.4

Typer is known as FastAPI of CLIs.

Typer stands on the shoulders of a giant. Its only internal dependency is Click

  • 在安装 fastapi 时,它还会根据要求安装这些依赖项。

所以要解决此ERROR: typer 0.3.2 has requirement click<7.2.0,>=7.1.1, but you'll have click 8.0.3 which is incompatible,您可以尝试以下任一方法:

  1. 尝试安装特定的点击版本,pip install click==7.2.0

  1. 升级打字机版本到0.4.0,pip install typer=0.4.0

可以参考incompatible click version and typer 0.3.2 has requirement click<7.2.0,>=7.1.1, but you have click 8.0.1