gpt4 book ai didi

OS X 上的 Python 2.7 : TypeError: 'frozenset' object is not callable on each command

转载 作者:行者123 更新时间:2023-11-28 19:54:17 25 4
gpt4 key购买 nike

我使用 Python 的每个命令都出现此错误:

➜  /tmp sudo easy_install pipTraceback (most recent call last):  File "/usr/bin/easy_install-2.7", line 11, in     load_entry_point('setuptools==1.1.6', 'console_scripts', 'easy_install')()  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point    return get_distribution(dist).load_entry_point(group, name)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point    return ep.load()  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load    entry = __import__(self.module_name, globals(),globals(), ['__name__'])  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/__init__.py", line 11, in     from setuptools.extension import Extension  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/extension.py", line 5, in     from setuptools.dist import _get_unpatched  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/dist.py", line 15, in     from setuptools.compat import numeric_types, basestring  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/compat.py", line 17, in     import httplib  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 80, in     import mimetools  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mimetools.py", line 6, in     import tempfile  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 35, in     from random import Random as _Random  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 49, in     import hashlib as _hashlib  File "build/bdist.macosx-10.11-intel/egg/hashlib.py", line 115, in     """TypeError: 'frozenset' object is not callable

我能用它做什么?

最佳答案

我也有这个问题,但我还需要安装 hashlib 包(在 Debian 上)。

我找到的最佳解决方案(最好使用 easy_install 安装 hashlib)来自这里: https://askubuntu.com/questions/770262/python-hashlib-fails-to-install-pip

它是:

“快速而肮脏的修复是删除/usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so 文件”

之后就可以用 pip 安装 hashlib 了!

关于OS X 上的 Python 2.7 : TypeError: 'frozenset' object is not callable on each command,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38751800/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com