sunil kancharlapalli
sunil kancharlapalli

Reputation: 105

Intel MKL FATAL ERROR: while trying to import gensim package

We have Anaconda 4.3.1 installed on our hosts and recently we have installed several packages for data science use. All the imports were fine except for gensim.

I am getting "Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so." and getting out of python shell.

It sounds like a duplicate but the weird part is, when I import tensorflow or seaborn before importing gensim, I am not getting that error and gensim is being imported. I would also like to know if there is any dependency between these packages. And I do have the latest version of numpy which is 1.14.5. I have looked at various solutions proposed about installing few packages and uninstalling few. I would like to know the reason why we should be doing it before actually doing it.

Upvotes: 0

Views: 869

Answers (1)

Anju Paul - Intel
Anju Paul - Intel

Reputation: 352

Here is my theory on your question:

Is there any dependency between gensim, tensoflow, seaborn and such packages? When you try to install these packages one by one using conda, you might have already seen conda prompting that some of the dependencies will be DOWNGRADED/UPDATED/INSTALLED. Hence there is dependency between the dependencies of these packages.

Why import error is thrown only on certain cases? Looks like a dependency issue. When you try to import gensim, it tries to load certain lib files, which its not able to find. However, when tensorflow or seaborn is imported the mentioned lib files might have already loaded, hence importing gensim did not show an error.

Why installing few packages and uninstalling few, help to solve the problem? This might help to have the correct dependencies for the packages to work properly.

Having said that, I tried to recreate the error that you got, however gensim is importing fine for me. If you could give the result of "conda list", will try to recreate the problem and would be able to give a better insight.

Upvotes: 2

Related Questions