简体   繁体   English

Flask python 设置:安装时出现 oauthlib 版本问题

[英]Flask python setup: oauthlib version problems while installing

I am extremely new to flask - just setting it up now for following a tutorial on how to build a web app including logins.我对 flask 非常陌生 - 现在只需将其设置为遵循有关如何构建 web 应用程序(包括登录)的教程。

Some of the packages I need for the tutorial are requests-oauthlib , flask-oauthlib and oauthlib .本教程需要的一些包是requests-oauthlibflask-oauthliboauthlib

I came across this problem while pip installing the requirements:我在 pip 安装要求时遇到了这个问题:

ERROR: flask-oauthlib 0.9.5 has requirement oauthlib!=2.0.3,!=2.0.4,!=2.0.5,<3.0.0,>=1.1.2, but you'll have oauthlib 3.1.0 which is incompatible.

Ok I need to downgrade oauthlib to satisfy flask-oauthlib .好的,我需要降级oauthlib以满足flask-oauthlib

I downgraded it and re-run everything, and get this error:我将其降级并重新运行所有内容,并收到此错误:

ERROR: requests-oauthlib 1.3.0 has requirement oauthlib>=3.0.0, but you'll have oauthlib 2.1.0 which is incompatible.

So now I need to upgrade oauthlib again to satisfy requests-oauthlib .所以现在我需要再次升级oauthlib 以满足requests-oauthlib

All the packages are complaining about something, but since I'm so new to this, I am not sure which one to listen to!所有的包裹都在抱怨什么,但由于我对此很陌生,我不知道该听哪一个!

My guess is to downgrade requests-oauthlib until the errors stop?我的猜测是降级requests-oauthlib直到错误停止?

These packages are all associated with the user-login part of flask, so for those of you familiar with this area, is there a stable configuration of all three versions that I should be using?这些包都与 flask 的用户登录部分相关联,所以对于那些熟悉这方面的人,我应该使用所有三个版本的稳定配置吗?

Otherwise I'm just blindly guessing and downgrading until something works.否则,我只是盲目地猜测和降级,直到某些东西起作用。

I used the following combination:我使用了以下组合:

pip install -I oauthlib==2.1.0
pip install -I requests-oauthlib==1.1.0

The versions are outdated, but requirements satisfied.版本已过时,但满足要求。

Also, you can use Authlib instead.此外,您可以改用Authlib

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM