-
Notifications
You must be signed in to change notification settings - Fork 43
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
Error in importation of linopy : MOSEK license not found #206
Comments
You're totally right! No MOSEK license should be required. @FabianHofmann something maybe going wrong with the new context manager? Lines 57 to 66 in a97febe
|
mmh, it works for me for all combinations:
are you on the latest master? |
I installed with pip. |
okay, could you then update the linopy package via pip? I just released version 0.3.2 |
It works now, thanks a lot. |
great! |
Hello @FabianHofmann I am having a similar issue where I am not able to use the MOSEK solver although I do not get any error messages. I have installed the MOSEK package in the environment but it does not show up in the list of "available_solvers" in "linopy". I tried updating "linopy" as explained above but does not seem to change anything. Interestingly, I was able to use MOSEK a couple of days ago before the weekend but when I tried to use it again, it did not show up in the list of "available_solvers". I tried to work with gurobi to check if I was missing something but I was able to use gurobi. Update:
When I was debugging, the code stopped at "t.optimize()" and did not reach checkinall and append. And it seems like it is a licensing error:
But from what I understand, I should be able to use MOSEK without license. Am I right or am I missing something? Update - Solution: I was able to figure it out. It seemed like the code was not able to access the license file. I manually added this during debugging to point out the location:
and from next time on it was able to automatically locate the license file. Please look into this issue if necessary. |
Dear Linopy community, I have installed version 0.3.1. I'm happy that MOSEK is now a possible solver, but when I import linopy on a computer without mosek I have the following error :
In [7]: import linopy
Traceback (most recent call last):
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3548, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import linopy
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/linopy/init.py", line 12, in
from linopy import model, remote
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/linopy/model.py", line 21, in
from linopy import solvers
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/linopy/solvers.py", line 61, in
m.optimize()
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/mosek/init.py", line 10781, in optimize
return self.__optimizetrm__1(*args,**kwds)
File "/home/rgirard/.virtualenvs/LEAP/lib/python3.10/site-packages/mosek/init.py", line 10770, in __optimizetrm__1
raise Error(rescode(_res_optimizetrm),_msg_optimizetrm)
mosek.Error: rescode.err_missing_license_file(1008): License cannot be located. The default search path is ':/home/rgirard/mosek/mosek.lic:'.
It should be possible to import linopy without having a mosek license ! Am I missing something ?
The text was updated successfully, but these errors were encountered: