Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with updating anaconda and installing new packages

I am trying to install seaborn on anaconda on Ubuntu-Linux.

conda install -c anaconda seaborn=0.7.1

I am getting the following error message:

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

When I run

$ /home/moritz/Python/anaconda3/bin/conda install -c anaconda seaborn=0.7.1

I am getting the following error message:

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'`

Any idea what the issue could be here? Many thanks in advance.

like image 513
clog14 Avatar asked Nov 22 '16 18:11

clog14


1 Answers

please see here: https://github.com/conda/conda/issues/3929

The issue was an old version of the cryptography package. It could be fixed by running:

CONDA_SSL_VERIFY=false conda update pyopenssl
like image 148
clog14 Avatar answered Oct 31 '22 17:10

clog14