'frozenset'对象不可调用 [英] 'frozenset' object is not callable

查看:144
本文介绍了'frozenset'对象不可调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在任何上下文中导入hashlib时,都会引发此错误:

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

有什么办法可以解决这个问题吗?我只是通过打开终端,运行python然后键入import hashlib来生成此错误.

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

推荐答案

昨天我遇到了同样的问题,未安装Hashlib,尝试使用pip安装它会出现该错误.我通过使用easy_install进行安装来修复它.

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.

我还必须安装Scipy和 Microsoft Visual C ++编译器Windows上的Python 2.7 ,它们是Hashlib必需的

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

这篇关于'frozenset'对象不可调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆