Forums

passlib ModuleNotFoundError after pip installed

Greetings, I am looking for some assistance in getting my first Flask project up and running. The error log indicates: Error running WSGI application ModuleNotFoundError: No module named 'passlib'

However I have already pip installed the module, and pip list confirms passlib 1.7.1. At the moment I am not using virtualenv. Python version 3.6. Any assistance would be appreciated.

Found the solution. For future reference:

pip<python version> install --user <package name>

Thus: pip3.6 install --user passlib was the answer as opposed to plain pip.

OK, glad you worked it out! Here's the relevant documentation.

I've uninstalled and reinstalled passlib on 3.8 as it isn't working, and I'm getting this error.

The exact install command I've issued it: pip3.8 install --user passlib

And the error is: 2021-04-23 15:16:17,674: Error running WSGI application

2021-04-23 15:16:17,677: ModuleNotFoundError: No module named 'passlib'

2021-04-23 15:16:17,677: File "/var/www/businesstranslations_pythonanywhere_com_wsgi.py", line 16, in <module>

2021-04-23 15:16:17,677: from app import app as application # noqa

2021-04-23 15:16:17,678:

2021-04-23 15:16:17,678: File "/home/businesstranslations/final_project/app.py", line 6, in <module>

2021-04-23 15:16:17,678: from passlib.hash import sha256_crypt, argon2

https://www.pythonanywhere.com/user/businesstranslations/files/var/log/businesstranslations.pythonanywhere.com.error.log

It seems to be related to this from my helpers file: :::python from passlib.hash import sha256_crypt

Apologies if this is a really silly thing to get confused about, I'm new to programming.

just to double check- the error log writes downwards, so the most recent error is at the bottom- are you looking at the most recent error?

Oh silly me! thanks it's not connecting to the db, probably related to me coming over here from another hosting site - sorry to bump a thread unnecessarily!