我需要在我的 django 项目中安装 twilio。该项目已经有一个 Pipfile 和 pipfile.lock 包含所需的其他依赖项。当我尝试使用命令“pipenv install twilio”安装 twilio 时,它给出了一个 resolutionfailure 错误。问题是 twilio 要求 PyJWT 版本为 1.7.1,但其他依赖项要求 PyJWT 的版本大于 2 且小于 3。我如何设法维护不同版本的 PyJWT 版本以及如何安装 twilio一样吗?
错误如下:
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches pyjwt<3,==1.7.1,>=2 (from twilio==6.62.1->-r C:\Users\lenovo\AppData\Local\Temp\pipenvjh75ft37requirements\pipenv-727q
x30b-constraints.txt (line 32))
Tried: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.3, 0.2.3, 0.3.0, 0.3.0, 0.3.1, 0.3.1, 0.3.2, 0.3.2, 0.4.0, 0.4.0, 0.4.1, 0.
4.1, 0.4.2, 0.4.2, 0.4.3, 0.4.3, 1.0.0, 1.0.0, 1.0.1, 1.0.1, 1.1.0, 1.1.0, 1.3.0, 1.3.0, 1.4.0, 1.4.0, 1.4.1, 1.4.1, 1.4.2, 1.4.2, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.
2, 1.5.2, 1.5.3, 1.5.3, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.7.0, 1.7.0, 1.7.1, 1.7.1, 2.0.0, 2.0.0, 2.0.1, 2.0.1, 2.1.0, 2.1.0
Skipped pre-versions: 2.0.0a1, 2.0.0a1, 2.0.0a2, 2.0.0a2
There are incompatible versions in the resolved dependencies:
pyjwt<3,>=2 (from djangorestframework-simplejwt==4.7.2->-r C:\Users\lenovo\AppData\Local\Temp\pipenvjh75ft37requirements\pipenv-727qx30b-constraints.txt (line 30
))
pyjwt==1.7.1 (from twilio==6.62.1->-r C:\Users\lenovo\AppData\Local\Temp\pipenvjh75ft37requirements\pipenv-727qx30b-constraints.txt (line 32))