• Register
1 vote
197 views

Problem :

I am very new to Python. Currently I am running the python script but I am constantly facing following error:

“Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.”

Please note both of my files are present in a anaconda2/lib directory. I am very confused about above error so need Python experts help in fixing above error.

9 6 2
3,980 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution :

I am experienced in Python so trying to help you. Please note the Anaconda 4.0.0 which is shipped with mkl enabled by default it has above issue. A problem is without a doubt with the Anaconda, as I can show it to you with a very simple python test shown below.

Above issue is with Anaconda which is linked with a mkl but it is not with a libmkl_core.so, So one can say it has the missing symbol and now you can cross check by running:

$ LD_DEBUG=symbols python -c 'import sklearn.linear_model.tests.test_randomized_l1' 2>&1 | grep -i error 2200:     /opt/anaconda/lib/python2.7/site-packages/scipy/special/../../../../libmkl_avx.so: error: symbol lookup error: undefined symbol: mkl_dft_fft_fix_twiddle_table_32f (fatal)
If you do not want to uninstall your mkl, because of the performance boost so you can do a  workaround just preload libmkl_core.so before the execution as shown below.
$ python -c 'import sklearn.linear_model.tests.test_randomized_l1'
Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.
$
$ LD_PRELOAD=/opt/anaconda/lib/libmkl_core.so python -c 'import sklearn.linear_model.tests.test_randomized_l1'
$

Hope my above solution saved your lot of time.

5 4 2
17,150 points

Related questions

0 votes
1 answer 32 views
32 views
Problem: How can I fix this issue: Importerror: libgl.so.1: cannot open shared object file: no such file or directory
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 2.2K views
2.2K views
Problem : The import matplotlib.pyplot as plt is is giving me the error with python2.7, anaconda3. The error shown is as below: ImportError: libGL.so.1: cannot open shared object file: No such file or directory The Detailed Error report is as below : Traceback ... <module> from PyQt5 import QtCore, QtGui, QtWidgets ImportError: libGL.so.1: cannot open shared object file: No such file or directory
asked Dec 18, 2019 alecxe 7.5k points
1 vote
1 answer 389 views
389 views
Problem : Currently I am learning anaconda and virtualenv. I want to start my virtual env using the virtualenv but I am facing below error: Already using interpreter /Users/pkilcrease/anaconda/bin/python3 Using base prefix '/Users/pkilcrease/anaconda' New python ... and virtualenv, but unable to fix the above error. Looking for experts advice for fixing above anaconda and virtualenv error.
asked May 6, 2020 stewart 4k points
0 votes
1 answer 238 views
238 views
Problem : I have recently installed the Anaconda 3 4.4.0, 32 bit on my Windows 7 Professional machine and also imported NumPy and Pandas on Jupyter notebook but facing following issue 'conda' is not recognized as an internal or external command, operable program or batch file.
asked Nov 14, 2019 peterlaw 6.9k points
0 votes
1 answer 7 views
7 views
Problem: I get the following error message when trying to set up a virtual environment with virtualenv 15.0.2 but receive: OSError setuptools pip wheel failed with error code 1. Any ideas how to resolve this issue?
asked Mar 24 ummesalma 27.2k points
1 vote
1 answer 254 views
254 views
Problem: Well, I have installed the seaborn package in my system by using conda install seaborn command. While I am trying to import the package in my script it shows an error ImportError: No module named seaborn Although the package has already installed on my system. I am ... you please shed some light on this, why I met with this error? I am looking for a solution to this problem. Thanks.
asked May 15, 2020 adamSw 11.3k points
0 votes
1 answer 2 views
2 views
Probem: The issue is my computer does not recognize Anaconda. When I open my command prompt and enter in &ldquo;conda&rdquo; , &ldquo;jupyter notebook&rdquo;, or &ldquo;python&rdquo; - I get an error message below: 'conda/jupyter/python' is not recognized as an internal or external command, operable program or batch file.
asked Apr 11 ummesalma 27.2k points
0 votes
1 answer 2 views
2 views
Problem: please solve it ... how to run python script in anaconda
asked Apr 4 Ifra 25.7k points
0 votes
1 answer 3 views
3 views
Problem: When I run conda install django, I get the following error: ERROR conda.core.link:_execute(481): An error occurred while installing package 'defaults::django-2.0.2-py36hd476221_0'. PermissionError(13, 'Permission denied') Attempting to roll back. What should I do?
asked Mar 31 ummesalma 27.2k points
0 votes
1 answer 3 views
3 views
Problem: how to I Solve this: grin 1.2.1 requires argparse>=1.1, which is not installed. HELP! I need help understanding this: grin 1.2.1 requires argparse>=1.1, which is not installed. Can someone please help solve this, I am new in python(). Someone have idea to solve this thanks!
asked Mar 7 Mashhoodch 13k points