Flask python setup: oauthlib version problems while installing

1k views Asked by At

I am extremely new to flask - just setting it up now for following a tutorial on how to build a web app including logins.

Some of the packages I need for the tutorial are requests-oauthlib,flask-oauthlib and oauthlib.

I came across this problem while pip installing the requirements:

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.

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.

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?

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?

Otherwise I'm just blindly guessing and downgrading until something works.

1

There are 1 answers

0
Pavel Isayenko On

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.