Skip to main content

License issue while using gurobi in Ubuntu on Windows WSL

Answered

Comments

9 comments

  • Official comment
    Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    With the new Gurobi 10.0, you can also use WLS licenses in WSL2 without any issues.

    Cheers,
    Matthias

  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Victor - 

    Two suggestions:

    1. 1. Can you try using WSL1? Please see our Knowledge Base article:  What system changes can invalidate a license file?
    2. 2. Does you university have a site license that you can access from your PC?

    Gwyneth

    0
  • Jakub Med
    Gurobi-versary
    First Comment

    Hi Gwyneth,

    I see this is not a frequent problem, so there is not intention to do something with it, but right now I am facing the same problem. I have gurobi installed on the WSL2; no, I cannot use WSL1 for other reasons; and I do not think that my university have a site license.

    I think I will just install gurobi on Windows and download python there, but that is not a pretty solution.

    Jakub Med

    0
  • Linden Wells
    Gurobi-versary
    First Comment

    Jakub Med I followed the steps outlined in https://github.com/microsoft/WSL/issues/5352#issuecomment-1076336583
    It's working for me so far.

    It works by fixing the MAC address at startup. Make sure you fix the MAC address to the one used by gurobi; in my case, I generated a fresh academic licence, ran grbgetkey with that key and copied the mac address into the script you can find at the link.

    0
  • Mattia
    Gurobi-versary
    First Comment

    I have the same problem and I tried what Linden suggests. I manage to set the MAC address on eth0 (renamed from bond0) and have internet connectivity from eth1 (renamed from eth0), but grbprobe now is picking up the HostID from eth1, so this still doesn't solve it for me.

    Which network adapter is supposedly used for gurobi's licences? (eth0, the one with internet connectivity, ...)

    0
  • Linden Wells
    Gurobi-versary
    First Comment

    Hi Mattia, apologies for the late reply. You might've figured it out, found an alternative solution or given up by now.

    If grbprobe is now picking up the HostID from eth1, then so be it; can you request another licence that's tied to the mac address that you force-fixed on eth1? I think that's what I did. I have 10 academic licences from me badgering about, changing computers etc.

    Open source gurobi when? That'd fix it.

    This issue is icky hey...

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hey everyone!

    Please excuse us for not following up here.

    Manually assigning a fixed MAC address to your network adapter inside WSL is actually a viable solution. Please see this Help Center article for details: How do I set up Gurobi in WSL2 (Windows Subsystem for Linux)?

    Best regards,
    Matthias

    0
  • Emmanuel Balogun
    Gurobi-versary
    First Comment

    Just wanted to follow up on this. Will Gurobi ever fix this internally or has it already been fixed? I am having the same issue as above.

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    This is a known challenge and is a result of how WSL handles network addresses. The following article describes two solutions: How do I set up Gurobi in WSL2 (Windows Subsystem for Linux)?

    If you choose to use "Option 1" in the article, instructions to request a free Academic Gurobi WLS license can be found on our Academic License Program website. 

    0

Please sign in to leave a comment.