1
$\begingroup$

I've successfully installed MATLink and used it in the past, but for some reason a couple of days ago it stopped working. It's maybe due to a Windows update? The error thrown is the following:

enter image description here

This is after running

Needs["MATLink`"]
OpenMATLAB[] 

I've rerun regmatlabserver just in case.

Any ideas on what I can try? In the FAQ there is a procedure entry point error, but it's a different kind, and with a .dll found in system32 and not the MATLAB bin\win64 folder.

Bests

Cris

Troubleshooting information:

Anaconda3 package info: https://pastebin.ubuntu.com/p/npmdrfrmT6/

MATLink 1.1 for Windows (Fri 15 Aug 2014)

11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)

Force 32-bit engine: False

System PATH:
C:\Program Files\Wolfram Research\Mathematica\11.3\SystemFiles\Libraries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\11.3\SystemFiles\Libraries\Windows
C:\Program Files\Wolfram Research\Mathematica\11.3\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\11.3
C:\Program Files\Wolfram Research\Mathematica\11.3\SystemFiles\FrontEnd\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\11.3\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\gurobi902\win64\bin
C:\Program Files\ImageMagick-7.0.8-Q16
C:\ffmpeg-4.1.1-win64-static\bin
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Program Files\Intel\iCLS Client\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\MiKTeX 2.9\miktex\bin\x64\
C:\Program Files\Microsoft VS Code\bin
C:\Program Files\gnuplot\bin
C:\Program Files\Git\cmd
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\AutoFirma\AutoFirma
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
C:\Program Files\Mosek\9.1\tools\platform\win64x86\bin
C:\Users\embog\AppData\Local\Programs\Julia\Julia-1.4.0-rc2\bin
C:\Users\embog\csdp6.2.0win64\bin
C:\Program Files\MATLAB\R2020a\runtime\win64
C:\Program Files\MATLAB\R2020a\bin
C:\Users\embog\anaconda3\Library\bin
C:\Users\embog\anaconda3\Scripts
C:\Users\embog\anaconda3
C:\Program Files\MATLAB\R2020a\bin\win64
C:\Users\embog\AppData\Local\Microsoft\WindowsApps
C:\MinGW\bin
C:\Users\embog\AppData\Local\GitHubDesktop\bin
C:\Users\embog\AppData\Local\Microsoft\WindowsApps
C:\Program Files\JetBrains\PyCharm 2019.2.3\bin
C:\Users\embog\AppData\Local\atom\bin


COM server information:
CLSID: {368C18D2-53D8-433A-AD3B-FCF8F16CBE3F}
Program ID: Matlab.Application (Version 9.8)
Command: C:\Program Files\MATLAB\R2020a\bin\win64\MATLAB.exe /MLAutomation
$\endgroup$
6
  • $\begingroup$ Try using SetEnvironment within Mathematica to remove everything except Windows and MATLAB-related stuff from the PATH. Check if it works then. Sometimes these issues are caused by an incompatible version of a DLL that ends up loaded. $\endgroup$ – Szabolcs Aug 23 '20 at 6:50
  • $\begingroup$ Thank you! This works, if you want add it as an answer and I can mark this as solved. $\endgroup$ – Cristian Em. Aug 23 '20 at 12:48
  • $\begingroup$ If you can find the time to figure out WHICH directory in the path was causing the trouble, that would actually be quite useful. I normally do this by removing half of them, trying if it works, then half of the "bad" half, and so on, until finding the culprit. Then it will be easier to help future users who may have this problem. $\endgroup$ – Szabolcs Aug 23 '20 at 17:47
  • $\begingroup$ Okay, I identified it. The culprit is anaconda3/library/bin. After removing it everything works fine. A couple of days ago I did a conda update -all so the culprit must be one of the updated packages. BUT I notice that if I move C:\Program Files\MATLAB\R2020a\bin\win64 to the beginning of PATH, that is, when I use SetEnvironment the R2020a\bin\win64 is the first directory set, and the I leave all the others as is, then it works well. So I don't need to remove Python from PATH. Do you need any more information? $\endgroup$ – Cristian Em. Aug 24 '20 at 8:09
  • $\begingroup$ I've appended as a .txt my package versions to the main question. $\endgroup$ – Cristian Em. Aug 24 '20 at 8:24
2
$\begingroup$

The question was answered in the comments to my question by @Szabolcs. In short, move the C:\Program Files\MATLAB\R2020a\bin\win64 to the beginning of PATH using SetEnvironment["PATH"->"C:\\Program Files\\MATLAB\\R2020a\\bin\\win64;[Rest...]"] in Mathematica. The culprit is anaconda3/library/bin, I don't know which package. It is not necessary to remove it from PATH, just make sure to load the MATLAB folder before that one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.