Python / openssl / homebrew问题“ ImportError:无法导入名称md5”

时间:2020-04-23 23:39:10

标签: python python-2.7 pip

我之前在我的机器上为Rails项目升级了一些红宝石产品,并且在此过程中似乎破坏了我的python环境。尝试运行pip或安装任何依赖项时,我得到此输出

My-MacBook-Pro:media-scraper Me$ pip
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/2.7.12/bin/pip", line 7, in <module>
    from pip._internal.main import main
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/main.py", line 13, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.py", line 11, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module>
    from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/locations.py", line 18, in <module>
    from pip._internal.utils import appdirs
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/utils/appdirs.py", line 16, in <module>
    from pip._internal.utils.compat import WINDOWS, expanduser
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_internal/utils/compat.py", line 17, in <module>
    from pip._vendor.urllib3.util import IS_PYOPENSSL
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.py", line 29, in <module>
    from .connection import (
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/urllib3/connection.py", line 40, in <module>
    from .util.ssl_ import (
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/urllib3/util/__init__.py", line 7, in <module>
    from .ssl_ import (
  File "/Users/me/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 8, in <module>
    from hashlib import md5, sha1, sha256
ImportError: cannot import name md5

我认为这是开放ssl的问题,这就是我早些时候需要为ruby更新的内容-我在互联网上搜索了大多数解决方案,但没有任何效果。谢谢!

0 个答案:

没有答案