我正在尝试在Ubuntu-Linux上的anaconda上安装seaborn。
conda install -c anaconda seaborn=0.7.1
我收到以下错误消息:
Fetching package metadata .../home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for conda.anaconda.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SubjectAltNameWarning
/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for conda.anaconda.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SubjectAltNameWarning
..An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.12
conda is private : False
conda-env version : 4.2.12
conda-build version : 1.19.0
python version : 3.5.2.final.0
requests version : 2.12.1
root environment : /home/moritz/Python/anaconda3 (writable)
default environment : /home/moritz/Python/anaconda3
envs directories : /home/moritz/Python/anaconda3/envs
package cache : /home/moritz/Python/anaconda3/pkgs
channel URLs : https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : None
offline mode : False
当我跑步时
$ /home/moritz/Python/anaconda3/bin/conda install -c anaconda seaborn=0.7.1
我收到以下错误消息:
Traceback (most recent call last):
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/exceptions.py", line 479, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/cli/main.py", line 145, in _main
exit_code = args.func(args, p)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/cli/main_install.py", line 80, in execute
install(args, parser, 'install')
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/cli/install.py", line 238, in install
prefix=prefix)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/api.py", line 24, in get_index
index = fetch_index(channel_urls, use_cache=use_cache, unknown=unknown)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 310, in fetch_index
repodatas = [(u, f.result()) for u, f in zip(urls, futures)]
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 310, in <listcomp>
repodatas = [(u, f.result()) for u, f in zip(urls, futures)]
File "/home/moritz/Python/anaconda3/lib/python3.5/concurrent/futures/_base.py", line 398, in result
return self.__get_result()
File "/home/moritz/Python/anaconda3/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
raise self._exception
File "/home/moritz/Python/anaconda3/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 74, in func
res = f(*args, **kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 116, in fetch_repodata
timeout=(3.05, 60))
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 594, in urlopen
chunked=chunked)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 350, in _make_request
self._validate_conn(conn)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 835, in _validate_conn
conn.connect()
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 330, in connect
cert = self.sock.getpeercert()
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 324, in getpeercert
'subjectAltName': get_subj_alt_name(x509)
File "/home/moritz/Python/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 171, in get_subj_alt_name
ext = cert.extensions.get_extension_for_class(
AttributeError: 'Extensions' object has no attribute 'get_extension_for_class'`
知道问题可能在这里吗?非常感谢提前。
答案 0 :(得分:11)
请看这里: https://github.com/conda/conda/issues/3929
问题是加密包的旧版本。它可以通过运行来修复:
CONDA_SSL_VERIFY=false conda update pyopenssl
答案 1 :(得分:6)
禁用验证可在Windows上运行的SSL证书的另一种方法:
将ssl_verify: False
添加到.condarc
文件。
.condarc
文件,但是在您第一次运行conda config
命令时,它会自动在用户的主目录中创建。
要设置ssl_verify
,可以使用以下命令:
conda config --set ssl_verify False
。