Skip to main content

Version Problem

Answered

Comments

13 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three 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 why not try our AI Gurobot?.
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    It looks like your default Python installation may not be the Anaconda Python, and your default Python has not been updated with Gurobi 8.1.1. When you type 

    which python

    at a Terminal command line what do you get?

    If from that same command line, you change to the /Library/gurobi811/mac64/ directory and run

    python setup.py install

    what happens?

    Thanks,

    Gwyneth

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    Hi Gwyneth,

     

    When I type "which python" I got:

    Last login: Wed Sep 25 00:02:53 on ttys000

    MacBook-Pro-de-Fernando:~ drfernando$ which python

    /anaconda3/bin/python

     

    And when I change to the directory /Library/gurobi811/mac64/ and type "

    python setup.py install

    I got:

    MacBook-Pro-de-Fernando:mac64 drfernando$ python setup.py install

    running install

    running build

    running build_py

    creating build

    creating build/lib

    creating build/lib/gurobipy

    copying lib/python3.6/gurobipy/__init__.py -> build/lib/gurobipy

    copying lib/python3.6/gurobipy/gurobipy.so -> build/lib/gurobipy

    running install_lib

    creating /anaconda3/lib/python3.6/site-packages/gurobipy

    copying build/lib/gurobipy/gurobipy.so -> /anaconda3/lib/python3.6/site-packages/gurobipy

    copying build/lib/gurobipy/__init__.py -> /anaconda3/lib/python3.6/site-packages/gurobipy

    byte-compiling /anaconda3/lib/python3.6/site-packages/gurobipy/__init__.py to __init__.cpython-36.pyc

    running install_egg_info

    Writing /anaconda3/lib/python3.6/site-packages/gurobipy-8.1.1-py3.6.egg-info

    removing /Library/gurobi811/mac64/build

    MacBook-Pro-de-Fernando:mac64 drfernando$ 

     

    Thanks,

     

    Fernando

     

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Thanks for trying that. What do you see when you run 

    echo $PYTHONSTARTUP 

    It looks like this might be an environment variable that has not been updated for some reason.

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    Nothing happens:

     

    MacBook-Pro-de-Fernando:mac64 drfernando$ echo $PYTHONSTARTUP

     

    MacBook-Pro-de-Fernando:mac64 drfernando$ echo $PYTHONSTARTUP

     

    MacBook-Pro-de-Fernando:mac64 drfernando$

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Thanks for sending that. I think I see the problem now. Can you try

    which gurobi.sh

    and then send the contents of that file?

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    Here is:

     

    MacBook-Pro-de-Fernando:mac64 drfernando$ which gurobi.sh

    /anaconda3/bin/gurobi.sh

    MacBook-Pro-de-Fernando:mac64 drfernando$ 

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Can you send the contents of that file? I suspect there is a PYTHONSTARTUP variable in it that points to the wrong directory for Gurobi.

    Also, are you sure that the example you ran in Acaconda used Gurobi 8.1.1?

    Thanks.

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    The content is:

    #!/bin/sh

    export PYTHONPATH=/Library/gurobi801/mac64/lib
    export PYTHONSTARTUP=/Library/gurobi801/mac64/lib/gurobi.py

    /usr/bin/python2.7 "$@"

     

    I´m not sure if I'm running 801 or 811. I've never had this problem before. But it seems that Gurobi is faster. Before the installation of Gurobi 811, I found the response in 300 seconds, now the solution is found in just 40 seconds.

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Ok, so I see that gurobi.sh is still pointing to the 8.0.1 installation.

    Please edit this file to point to gurobi811 instead of gurobi801, and let me know if that works.

    Thanks.

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    Thanks so much Gwyneth, it worked. 

    So the issue is solved.

     

    Best regards,

    Fernando

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Fernando - 

    Glad to hear it! Thanks for letting me know. I have never seen this issue before!

    Happy gurobi-ing!

    Gwyneth

    0
  • Jose Fernando Hernandez Silva
    Gurobi-versary
    Conversationalist
    First Question

    I'm using Gurobi Solver since 2016 (Gurobi 6) and I´ve never had this problem. Thanks again for your help.

    0

Post is closed for comments.