Python 如何修复libcrypto?

Python 如何修复libcrypto?,python,django,macos,libpq,Python,Django,Macos,Libpq,我错误地将libcrypto.文件从/Library/PostgreSQL/9.2/lib复制到/usr/lib,因为我从Psycopg2得到错误,说它需要1.0.0,而我现在只有0.9.8或类似的东西,我陷入了以下困境,找不到解决方案(这是我问题的解决方案,但很糟糕)。我怎样才能解决这个问题 taylor-pc:python taylor$ mkvirtualenv testingenv ERROR:root:code for hash md5 was not found. Traceback

我错误地将
libcrypto.
文件从
/Library/PostgreSQL/9.2/lib
复制到
/usr/lib
,因为我从
Psycopg2
得到错误,说它需要
1.0.0
,而我现在只有
0.9.8
或类似的东西,我陷入了以下困境,找不到解决方案(这是我问题的解决方案,但很糟糕)。我怎样才能解决这个问题

taylor-pc:python taylor$ mkvirtualenv testingenv
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
New python executable in testingenv/bin/python
Installing setuptools..............................................................
  Complete output from command /Users/taylor/Projec...estingenv/bin/python -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" /Library/Python/2.7/...ols-0.6c11-py2.7.egg:
  ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "<string>", line 67, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/md5.py", line 10, in <module>
    from hashlib import md5
ImportError: cannot import name md5
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 8, in <module>
    load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 942, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1052, in create_environment
    search_dirs=search_dirs, never_download=never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 598, in install_setuptools
    search_dirs=search_dirs, never_download=never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 570, in _install_req
    cwd=cwd)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1020, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/taylor/Projec...estingenv/bin/python -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" /Library/Python/2.7/...ols-0.6c11-py2.7.egg failed with error code 1
taylor pc:python taylor$mkvirtualenv testingenv
错误:根:未找到哈希md5的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型md5
错误:根:未找到哈希sha1的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha1
错误:根:未找到哈希sha224的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha224
错误:根:未找到哈希sha256的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha256
错误:根:未找到哈希sha384的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha384
错误:根:未找到哈希sha512的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha512
testingenv/bin/python中的新python可执行文件
安装安装工具。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
从命令/Users/taylor/Projec…estingenv/bin/python-c“#!python”完成输出
\“\”\“Bootstra…sys.argv[1:])
“/Library/Python/2.7/…ols-0.6c11-py2.7.egg:
错误:根:未找到哈希md5的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型md5
错误:根:未找到哈希sha1的代码。
回溯(最近一次呼叫最后一次):
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第139行,在
globals()[\uuuuu func\u name]=\uuuu get\u散列(\uuuu func\u name)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第103行,在openssl构造函数中
return\u get\u内置构造函数(名称)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”,第91行,在
raise VALUERROR('不支持的哈希类型%s'%name))
ValueError:不支持的哈希类型sha1
错误:根:未找到哈希sha224的代码。
回溯(most)