Alex van Winkel
Alex van Winkel

Reputation: 41

ModuleNotFoundError: No module named 'passlib', even after pip installing and pipenv installing

So I know, it seems this question has been asked before, but I do believe I have a unique situation.

I'm developing a Flask app (specifics below). I've created a virtual environment with pipenv. But no matter what I try, I keep getting this error:

ModuleNotFoundError: No module named 'passlib'

I've tried:

And I'm running out of ideas....

Here is some context:


Python version: 3.9.9 pip version: 20.1.1 Flask version: 1.1.2 Werkzeug version: 1.0.1

OS : Windows 10 Editor: VS Code

Part of the code where I get the error message:

from passlib.hash import sha256_crypt

Upvotes: 1

Views: 1255

Answers (1)

Alex van Winkel
Alex van Winkel

Reputation: 41

Well, thanks to a friend I found a workaround. This workaround might point in the direction of a permanent solution...

So here's the workaround I used:

  • I figured out where pipenv stores the files for the passlib module
  • I copied all the folders related to passlib into my main project folder

PRESTO ! Error message gone...

Upvotes: -1

Related Questions