Forums

flask_oidc not found

Hello,

I've set up a flask app and it runs so far. Only flask-oidc causes trouble.

I'm importing it this way:

from flask_oidc import OpenIDConnect

In the log I get this error:

2022-02-09 10:32:44,151: Error running WSGI application
2022-02-09 10:32:44,160: ModuleNotFoundError: No module named 'flask_oidc'
2022-02-09 10:32:44,160:   File "/var/www/mmxxst7_pythonanywhere_com_wsgi.py", line 16, in <module>
2022-02-09 10:32:44,161:     from flask_app import app as application  # noqa
2022-02-09 10:32:44,161: 
2022-02-09 10:32:44,161:   File "/home/mmxxst7/mysite/flask_app.py", line 6, in <module>
2022-02-09 10:32:44,161:     from flask_oidc import OpenIDConnect

In the pip list I see it is installed. What could be the problem?

Thank you!

Make sure you've installed it for the same Python version / virtual environment that runs your web app.

Yes, I created a virtual environment and now it works. Thanks! Another question, I set up python 3.8, but when I access /home/mmxxst7/.local/lib I see python 3.9. Why is that?

I'm asking because I need to access the flask_oidc folder to make changes in the init.py. Does it mean changes in the flask_oidc folder in ..lib/python 3.9 won't have any effect? I can't find any other flask_oidc folder...

All good, I found the correct installation path . thank you

Glad to hear that!