我只是干净安装了anaconda2,conda总是抛出这个错误:
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/anaconda2/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/home/niid/anaconda2/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 "/home/niid/.bin/conda", line 11, in <module>
sys.exit(main())
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 182, in main
return conda_exception_handler(_main, *args)
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 644, in conda_exception_handler
return handle_exception(e)
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 634, in handle_exception print_unexpected_error_message(e)
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 596, in print_unexpected_error_message
stderrlogger.info(get_main_info_str(get_info_dict()))
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/cli/main_info.py", line 162, in get_info_dict
from ..connection import user_agent
File "/home/niid/anaconda2/lib/python2.7/site-packages/conda/connection.py", line 12, in <module>
from requests import Session, __version__ as REQUESTS_VERSION
File "/home/niid/anaconda2/lib/python2.7/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/home/niid/anaconda2/lib/python2.7/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/niid/anaconda2/lib/python2.7/site-packages/urllib3/connectionpool.py", line 29, in <module>
from .connection import (
File "/home/niid/anaconda2/lib/python2.7/site-packages/urllib3/connection.py", line 39, in <module>
from .util.ssl_ import (
File "/home/niid/anaconda2/lib/python2.7/site-packages/urllib3/util/__init__.py", line 6, in <module>
from .ssl_ import (
File "/home/niid/anaconda2/lib/python2.7/site-packages/urllib3/util/ssl_.py", line 7, in <module>
from hashlib import md5, sha1, sha256
ImportError: cannot import name md5
在安装期间调用conda时会发生此错误的第一个实例。
可以通过手动调用conda或通过调用
来复制$HOME/anaconda2/python -c "import md5"
到目前为止,我无法找到与此问题相关的任何修复程序。因为我刚刚做了这件事,这很奇怪
rm -rf $HOME/anaconda2
然后重新安装。
修改
这个问题似乎只适用于Anaconda 5.我重新安装了Anaconda 4.4.0并且没有出现问题。我会试试anaconda论坛。