Can Not Import Scrypt From Hashlib
I try to use import scrypt from the standard libary. Both on my local machine (ubuntu 16.04) and the server (heroku/heroku stack) the import fails. Traceback (most recent call last
Solution 1:
As far as I understand it, a requirement to use scrypt is that you have OpenSSL 1.1+ installed. If you have a look at the hashlib.py:
try:
# OpenSSL's scrypt requires OpenSSL 1.1+from _hashlib import scrypt
except ImportError:
pass
you see that the import to make scrypt available for you just passes without any message if you don't have OpenSSL in the right version installed and of course you can't use it if that happens. Maybe the scrypt package from pypi (https://pypi.python.org/pypi/scrypt/) is an alternative for you?
Post a Comment for "Can Not Import Scrypt From Hashlib"