Hashlib is part of Python's standard library, so you don't have to install it.
However, the only hash algorithms that are guaranteed to be available are md5, sha1, sha224, sha256, sha384, and sha512.
Others may be available depending on the SSL library that is used on your platform.
You can run openssl list-message-digest-algorithms
in a terminal to see which algorithms are available.
(Note: as of openssl 1.1.1, the above command doesn't work. Try openssl dgst -list
)
The above assumes that Python uses the system's SSL library, which might not be the case.
Or (better) from Python:
import hashlib
print(hashlib.algorithms_available)
If ripemd160
isn't available, you should probably look into re-installing your SSL library with different options. (Assuming Python uses the system's SSL)
If you are changing your SSL library to one with a different version number, you will have to rebuild anything that depends on it as well.