Error--rescode.err_missing_license_file(1008): License cannot be located

2.5k Views Asked by At

I was running a python program which uses CVXPY to solve a optimization problem involving semi-definite constraints. Initially the code ran well when I was using the default solver provided by CVXPY. Then I tried to use MOSEK as the optimization solver. Since it has to be installed, I tried installing it from command prompt using a pip installer. However the installation was interrupted midway (I am unaware of the specific reasons). Now whenever I am trying to run the code, it is prompting an error- rescode.err_missing_license_file(1008): License cannot be located. The default search path is ';C:\Users\dsouv\mosek\mosek.lic;'.

I can understand that somehow the default search path has been changed due to the failed installation of MOSEK. Even after calling the default solver of CVXPY, I am still getting the same error. Things I have tried:

  1. Reinstalling CVXPY.
  2. Reinstalling MOSEK from the Anaconda Powershell Prompt.

Even after trying out these, the error still persist. Any suggestions to solve this issue is welcome. Also please me if you need any other informtion. Thanks

2

There are 2 best solutions below

1
ErlingMOSEK On

You should install the license file separately. I.e. do step 3 at

https://www.mosek.com/resources/getting-started/

0
Yeongjae Kim On

Try to check if the extension of the downloaded file is "MS-DOS" or "LIC". I downloaded a license file using the Outlook app, and the file extension was changed, so the Mosek couldn't read the file extension. I solved this problem by downloading it through an e-mail browser, not the e-mail app.