【发布时间】:2022-01-15 00:47:26
【问题描述】:
当我运行我的 requirements.txt 文件时,我收到以下错误消息
ERROR: Cannot install PyJWT==2.0.0 and djangorestframework-jwt==1.11.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested PyJWT==2.0.0
djangorestframework-jwt 1.11.0 depends on PyJWT<2.0.0 and >=1.5.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
两个依赖的写法如下:
- PyJWT==2.0.0
- djangorestframework-jwt==1.11.0
但我最困惑的是错误消息部分说:djangorestframework-jwt 1.11.0 依赖于 PyJWT=1.5.2
PyJWT 2.0.0 版还不够好吗?
【问题讨论】:
-
错误:无法安装 PyJWT==2.0.0 和 djangorestframework-jwt==1.11.0,因为这些软件包版本具有冲突的依赖项。冲突是由以下原因引起的:用户请求 PyJWT==2.0.0 djangorestframework-jwt 1.11.0 依赖于 PyJWT=1.5.2 要解决此问题,您可以尝试: 1. 放宽包版本的范围您已指定 2. 删除软件包版本以允许 pip 尝试解决依赖冲突错误:ResolutionImpossible:寻求帮助,请访问pip.pypa.io/en/latest/user_guide/…
标签: python dependencies version dependency-management