installing gurobi in python requires root access




  • Daniel Espinoza

    A dirty way to avoid the issue is to copy /opt/gurobi to a local/user directory, and run from there....

    Comment actions Permalink
  • Joris Kinable

    It turns out, the solution is quite easy. Instead of invoking:

    >python install

    one can simply invoke:

    > python build -b /tmp/gurobi install

    The -b flag specifies a custom build directory. So in summary, to install gurobi in a venv environment without sudo permissions:

    1. Create a virtual environment:
    > python3 -m venv gurobi-env
    2. Activate the virtual environment:
    > source ./gurobi-env/bin/activate
    3. Change to the gurobi install dir:
    > cd /opt/gurobi811/linux64/
    4. Install gurobi with a custom build path
    > python build -b /tmp/gurobi install


    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk