Skip to main content

environment variables in `.bashrc` are accessible linux CLI, but not from the `gurobi.sh` executable. 

Answered

Comments

5 comments

  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Can you please add export before

    GUROBI_HOME="/gpfs/home/ME/.local/opt/gurobi1002/linux64"
    • E.g., export GUROBI_HOME=/gpfs/home/ME/.local/opt/gurobi1002/linux64.
    • You need to make sure the variable is exported so it is inherited to child processes! It is not sufficient to simply execute GUROBI_HOME=/gpfs/home/ME/.local/opt/gurobi1002/linux64.
    1
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Matthew,

    Can you see if running

    source gurobi.sh

    activates the shell?

    - Riley

    0
  • Matthew Hall
    First Question
    First Comment

    yes, it does

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    I see, well that is certainly one way you could run it.

    I am wondering if your Python virtual environment (.venv) is causing issues here, since it will modify environment variables.  The Gurobi shell is just a wrapper around a lightweight Python executable so it may not be surprising if a virtual environment is causing a problem.  Can you try running gurobi.sh outside your virtual environment and see if it makes a difference?

    0
  • Matt Hall
    Gurobi-versary
    First Comment
    First Question

    Thank you! How silly of me to leave export off of that one line. That has fixed my issue.

    0

Please sign in to leave a comment.