'frozenset' object is not callable

Alex Beals picture Alex Beals · Dec 4, 2015 · Viewed 19.1k times · Source

When I attempt to import hashlib in any context, it throws this error:

File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.11-intel/egg/hashlib.py", line 115, in <module>
    """
TypeError: 'frozenset' object is not callable

Any idea how I can resolve this? I'm generating this error simply by opening up Terminal, running python and then typing import hashlib.

Answer

Lynob picture Lynob · Apr 1, 2016

I had the same problem yesterday, Hashlib wasn't installed and trying to install it using pip would give that error. I fixed it by installing it using easy_install instead.

Also I had to install Scipy and Microsoft Visual C++ Compiler for Python 2.7 on Windows, they were required for Hashlib