I am trying to solve a linear optimization problem and thought that I'll use MOSEK to see if theres any speed improvement. So I obtained a MOSEK academic license, and saved the .lic file at /Users/USERNAME/mosek/mosek.lic. Then I ran the following code

  FileNameJoin[{$HomeDirectory, "mosek", "mosek.lic"}]]

However, mathematica did not recognise this license and using Method -> "MOSEK" in optiimization problem outputs a license error. I am using 13.2.1 for Mac OS X ARM (64-bit).

What am I doing wrong?

  • $\begingroup$ You don't need SetEnvironment. Restart your computer. Mathematica automatically run MOSEK license from HOME directory. $\endgroup$ Aug 26, 2023 at 8:34
  • $\begingroup$ I tried that but it doesnt work $\endgroup$
    – Dotman
    Aug 26, 2023 at 10:36
  • $\begingroup$ Fortunately it works on my computer. What problem do you solve? Could you show part of your code with MOSEK call? $\endgroup$ Aug 26, 2023 at 12:15
  • $\begingroup$ I tried to run the demo code NMinimize[{x^2 + 2 y^2, {x + y == 1}}, {x, y}, Method -> "MOSEK"] $\endgroup$
    – Dotman
    Aug 26, 2023 at 12:39
  • 2
    $\begingroup$ Check $HomeDirectory path. Then check license path. Finally check license, maybe it has been corrupted. $\endgroup$ Aug 27, 2023 at 2:28

1 Answer 1


This issue has been resolved in Mathematica 13.3


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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