# To use mkl 2018 with theano you must set "mkl_threading_layer=gnu" in your environement.

35 views

## Problem :

I am trying to install theano with the help of following command:

conda install theano

on my Ubuntu 16.04. But facing following import problems.

import theano Traceback (most recent call last):

File"/home/milenko/miniconda3/lib/python3.6/configparser.py", line 2138, in _unify_values

sectiondict = self._sections[section]

KeyError: 'blas'

File "/home/milenko/miniconda3/lib/python3.6/site-packages/theano/configdefaults.py", line 3152, in check_mkl_openmp

raise RuntimeError('To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.')

RuntimeError: To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.

How to resolve this issue? Any clues?

## Solution :

I had also faced the similar error in the recent past on my Ubuntu-GNOME 16.04.

To resolve this error , I had done lot of research on it and finally I found the solution on it as follows:

I simply added the export statement in my .zshrc as follows:

And after that I executed the following command to compile the configuration file as follows :

\$ source ~/.zshrc

After this command , I could import theano without any issues.

OR

You can solved your problem as follows:

I found that MKL 2018 has some very serious problems

So I executed the following commands.

conda uninstall mkl=2018
conda install mkl=2017

And it resolved my problems.

## Related questions

1.6K views
Problem : I am getting following pydot error importerror: failed to import pydot. you must install pydot and graphviz for pydotprint to work.
68 views
Problem : I am in a process of upgrading my codeigniter from the 1.7.2 to 2.0.1. Everything seems to have gone as expected except I get below error: &ldquo;In order to use the Session class you are required to set an encryption key in your config file.&rdquo; ... .0.1 that has caused above error? What change should I do to fix the above error. Will making the said change break anything for me?