New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freshly installed anaconda3 python crashes on use of MKL due to python fetching wrong dll's on import #8561
Comments
It appears that software like Amplitube will install another copy of MKL library DLLs to the A simple solution for me now is to temporarily remove (or simply rename) the MKL dlls under |
Then you need to ask Amplitube people to stop installing non-system DLLs into the This is the worst thing a software developer can do with regards to DLL-hell. It is basically saying "we don't care about any other software on your computer so long as our software works OK" |
I was also facing MKL error when running |
Just started to learn programming and find this solution written in way easy to understand. It works for me by renaming: Thanks! |
I don't have amplitube installed still I am facing the similar issue
populated config files : C:\Users\Navin.condarc `
populated config files : C:\Users\Navin.condarc |
@NavinSinghsays, please type |
when I executed the when same code was executed on Anaconda prompt following is the o/p |
@NavinSinghsays does your code work outside of Spyder? |
yes, I tried the code on jupyterlab and the problem is same. |
Can you try it in the Python interpreter please? |
@mingwandroid Hey, I updated my OS and issue is resolved. Thank you for the help. |
Thank you for this thread!! It saved me! I uninstalled Amplitube and everything worked fine. I am relifed! No never more amplitube for me |
i have the same problem. did you find a solution? |
Because pure python is extremely slow, numpy uses certain files with pre-compiled code (written in a faster language, like c++ or c), which it calls upon when you do heavy numerical operations. When you run a python script, it needs to search for these files in folders on your computer. Python has a list of places it will search (pythonpath, search it up), and when it finds the file it's looking for, it will use that. The error message I posted, says that python couldn't find a certain function in the MKL library. This was due to python finding an older version of the mkl-files it was looking for, where this function didn't exist, in a folder with a higher search priority than the folder where numpy actually had put these files. The files python found, belonged to another application (Amplitube), which had sloppily put its dependencies (the files) in the System32 folder. The solution for me was simply renaming the files that Amplitube uses (this could break amplitube though). Do NOT delete them, though, unless you are certain. Because then python wouldn't recognize the erroneous files anymore, and search all the way through the different directories until finding the file it was actually looking for. If you have the same problem as me, you should check if a file with the same name as that which the error is referring to by chance is located in your System32 folder or any other folder in the pythonpath. |
Thank you for your kind reply. After reading your reply I have uninstalled the video editing programs and i do not experience the error anymore.
…Sent from my iPad
On 22 Jan 2019, at 21:06, sigurof ***@***.***> wrote:
@HasArslan
Because pure python is extremely slow, numpy uses certain files with pre-compiled code (written in a faster language, like c++ or c), which it calls upon when you do heavy numerical operations. When you run a python script, it needs to search for these files in folders on your computer. Python has a list of places it will search (pythonpath, search it up), and when it finds the file it's looking for, it will use that.
The error message I posted, says that python couldn't find a certain function in the MKL library. This was due to python finding an older version of the mkl-files it was looking for, where this function didn't exist, in a folder with a higher search priority than the folder where numpy actually had put these files. The files python found, belonged to another application (Amplitube), which had sloppily put its dependencies (the files) in the System32 folder.
The solution for me was simply renaming the files that Amplitube uses (this could break amplitube though). Do NOT delete them, though, unless you are certain.
If you have the same problem as me, you should check if a file with the same name as that which the error is referring to by chance is located in your System32 folder or any other folder in the pythonpath.
(The python path is basically a python variable with a list of paths).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
['System32\libiomp5md.dll', 'System32\mkl_core.dll', 'System32\mkl_def.dll','System32\mkl_intel_thread.dll', 'SysWOW64\libiomp5md.dll','SysWOW64\mkl_core.dll','SysWOW64\mkl_intel_thread.dll', 'SysWOW64\mkl_p4.dll', 'SysWOW64\mkl_p4m.dll','SysWOW64\mkl_p4m3.dll', 'SysWOW64\mkl_p4p.dll'] Remove all these ddl files from C:\Windows\SysWOW64 and C:\Windows\System32 Just do this and restart the application once again and hurrrahhhh!!! ur problem will be solved and it will open without showing any ordinal 242 error............just do it it is the only solution.. |
We have another solution we're evaluating. If anyone can help we'd be grateful:
|
After running conda udate --all I get the ordinal 242 error message too. It happens when I try to open Spyder as well as when I try to run code. I tryed to reinstall without success. Amplitude was never installed on my system. I also get the error "chcp" could not be found in Anaconda promt. Running After the change, I get this problem: pyinstaller/pyinstaller#3740. |
Another way which Works for me (I deleted all DLL files but the problem continued) was to downgrade ANACONDA to Anaconda3-5.2.0-Windows-x86_64. |
5.2.0 works because it's using an older MKL that's compatible with whatever else is on your system that's interfering. The new python builds that Ray mentions are now on defaults. Before trying any other workarounds, please update python and try again. |
I just updated this, seems to work. What changed? |
We implemented a fix for dll hell but decided against enabling it by default as it's somewhat controversial. Still dll hell is a fact on the ground and recommending people uninstall software isn't good enough. Please set the env var CONDA_DLL_SEARCH_MODIFICATION_ENABLE and be happy. The python on my channel has this flag enabled by default. You are best off using the defaults channels packages though. |
Actual Behavior
Anaconda3's installation of Python with MKL on Windows crashes bad and outputs the following error message:
Expected Behavior
I would normally expect python not to crash bad and output such an error message.
Steps to Reproduce
What is causing the error
dll hell. Some previous application on my computer has installed several mkl files (dll's) in C:\Windows\System32, which for some reason causes python to load those instead of the proper ones.
This issue is very similar to numpy/numpy#6923, which seems to be caused by the same set of files. The folks over there traced the dll's back to Amplitube, which is certainly installed on my computer (not anymore it ain't).
I have confirmed that "disabling" the files
C:\Windows\System32\mkl_intel_thread.dll
C:\Windows\System32\mkl_def.dll
C:\Windows\System32\mkl_core.dll
by renaming them to disabled_mkl_blablabla, fixes the issue. It then seems like python discovers the correct dll files in Anaconda3. I am going to see if uninstalling Amplitube fixes the issue.
Even though the issue is similar to the one linked above, I think it deserves a new post, since it literally took me days to figure this problem out.
Hope this post helps someone out there!
Anaconda or Miniconda version:
Anaconda version 1.6.5
Operating System:
Windows 10
conda info
conda list --show-channel-urls
EDIT: 23-Feb 2019: Uninstalling Amplitube did resolve the problem.
The text was updated successfully, but these errors were encountered: