Chris Topher
Chris Topher

Reputation: 37

unable to import passlib in python 3.5.2

I am trying to use passlib in python 3.5.2 installed on Windows 8.1. I installed passlib using :

pip install passlib 

It installed without any issues, but whenever I try to use it

from passlib.hash import pbkdf2_sha256

I get the error message: ImportError: No module named 'passlib' I am not sure if there are any additional steps to get passlib working?

thanks

Upvotes: 1

Views: 3128

Answers (2)

Chris Topher
Chris Topher

Reputation: 37

I was accidentally trying to run my script in the 32 bit version of idle instead of the 64 bit version of idle. My version of windows is 64 bit.

Upvotes: 0

Chris
Chris

Reputation: 11

First try:

pip3 install passlib

If it doesn't work, try this:

from passlib.hash import sha256_crypt
secure = input("password")
print("The secure hash is : " + sha256_crypt.encrypt(secure))

Upvotes: 1

Related Questions