Skip to main content

Gurobi solver not working in Azure Cloud Function

Ongoing

Comments

6 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff

    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.

  • Marika Karbstein
    • Gurobi Staff

    I have no experience with Azure Function Apps. But the output shows

    ModuleNotFoundError: No module named 'gurobipy'

    Did you make sure that gurobipy is installed and can be found?

    0
  • Riley Clement
    • Gurobi Staff

    Additional to Marika's comment, can you see gurobipy as a subfolder of the following directory?

    /home/site/wwwroot/.python_packages/lib/site-packages/

     

    0
  • Yassin Alhafiz
    • Gurobi-versary
    • First Comment
    • First Question

    Hey,

    Yes I made sure gurobipy is installed, I have outputted installed packages above and can see that gurobipy is listed. I have also navigated to that directory and I see the gurobipy subfolder. 

    0
  • Riley Clement
    • Gurobi Staff

    A similar issue is reported in this Stack Overflow post.
    https://stackoverflow.com/questions/72215655/local-module-not-found-in-azure-function

    Can you see if the selected answer there helps?

    0
  • Yassin Alhafiz
    • Gurobi-versary
    • First Comment
    • First Question

    Hey,

    The issue was being caused by the solver option "tee=True" being enabled as well as having a log file defined. It seems Azure is a read only environment and the log streams from the Gurobi server is causing an issue. 

    Disabling the logs resolved the issue but now cannot retrieve logs. Is there a Gurobi API to get logs by run ID directly from the server?

    0

Post is closed for comments.