pip hashlib时报错TypeError: 'frozenset' object is not callable

在阿里云上

[root@********* ~]# pip install hashlib
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting hashlib
  Downloading http://mirrors.aliyun.com/pypi/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip (42kB)
    24% |鈻堚枅鈻堚枅鈻堚枅鈻堚枈                        | 10kB 25.4MB/s eta 0:0    48% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枌                | 20kB     72% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚    96% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚    100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 51kB 1.7MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "", line 1, in 
      File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in 
        from setuptools.extern.six.moves import filter, map
      File "/usr/lib/python2.7/site-packages/setuptools/extern/__init__.py", line 1, in 
        from pkg_resources.extern import VendorImporter
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 36, in 
        import email.parser
      File "/usr/lib64/python2.7/email/parser.py", line 12, in 
        from email.feedparser import FeedParser
      File "/usr/lib64/python2.7/email/feedparser.py", line 27, in 
        from email import message
      File "/usr/lib64/python2.7/email/message.py", line 16, in 
        import email.charset
      File "/usr/lib64/python2.7/email/charset.py", line 13, in 
        import email.base64mime
      File "/usr/lib64/python2.7/email/base64mime.py", line 40, in 
        from email.utils import fix_eols
      File "/usr/lib64/python2.7/email/utils.py", line 27, in 
        import random
      File "/usr/lib64/python2.7/random.py", line 49, in 
        import hashlib as _hashlib
      File "hashlib.py", line 115, in 
        f()
    TypeError: 'frozenset' object is not callable

时报错 TypeError: 'frozenset' object is not callable,本地pip应该也是一样的操作。百度了一下以后决定手动下载安装包然后安装。安装包在这里下载https://pypi.org/project/hashlib/,选择合适的版本,下载解压,然后cd到解压的目录下,运行setup.py文件

python setup.py install

报错:error: command 'gcc' failed with exit status 1,百度,说是安装一个对应的devel环境就可以了。执行

yum install python-devel

然后接着上面的手动安装就可以了。

你可能感兴趣的:(pip hashlib时报错TypeError: 'frozenset' object is not callable)