メインコンテンツへスキップ

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

回答済み

コメント

6件のコメント

  • 正式なコメント
    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.
  • Riley Clement
    • Gurobi Staff

    Hi Matthew,

    Can you see if running

    source gurobi.sh

    activates the shell?

    - Riley

    0
  • Matthew Hall
    • Gurobi-versary
    • First Question
    • First Comment

    yes, it does

    0
  • Riley Clement
    • 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
  • Gwyneth Butera
    • 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
  • 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

投稿コメントは受け付けていません。