Skip to main content

Issue with updating gurobipy version

Answered

Comments

9 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.
  • Riley Clement
    • Gurobi Staff

    Hi Jun,

    Can you try with the following?

    python -m pip install --ignore-installed gurobipy==10.0.1

    - Riley

    0
  • JUN ZHOU
    • Gurobi-versary
    • Conversationalist
    • First Question

    Thanks for your reply, Riley. I tried the code, but the version is still 10.0.0.

    C:\Users\whu14>python -m pip install --ignore-installed gurobipy==10.0.1
    Collecting gurobipy==10.0.1
      Using cached gurobipy-10.0.1-cp310-cp310-win_amd64.whl (9.6 MB)
    Installing collected packages: gurobipy
    Successfully installed gurobipy-10.0.0
    0
  • Riley Clement
    • Gurobi Staff

    Hmm this is strange.  What version does "python -m pip list" show?

    0
  • JUN ZHOU
    • Gurobi-versary
    • Conversationalist
    • First Question

    It's gurobipy 10.0.0

    0
  • Riley Clement
    • Gurobi Staff

    I will do a bit of digging, but I suggest trying to uninstall (perhaps a couple of times) with both

    python -m pip uninstall gurobipy
    pip uninstall gurobipy

    then verifying that it is not installed with pip list and then trying to install from scratch

    python -m pip install --no-cache-dir gurobipy

    - Riley

    0
  • David Torres Sanchez
    • Gurobi Staff

    Hi Jun,

    This is probably because you installed \(\texttt{gurobipy}\) initially using the setup.py method (from  How do I install Gurobi for Python?).
    I think you need to go into the directory where the package lives and manually delete all the files.
    After this, you should be able to run the original  \(\texttt{pip install}\) command with no issues.

    To find out where the package currently lives you can do:

    import gurobipy
    print(gurobipy.__file__)

    Then make sure you delete all folders in the package directory with \(\texttt{gurobipy*}\).

    Cheers, 
    David

    0
  • JUN ZHOU
    • Gurobi-versary
    • Conversationalist
    • First Question

    Riley and David, Thanks for your help.

    I'll try the method you suggested. 

    0
  • Diego Da Cruz Pereira
    • Gurobi-versary
    • First Comment

    Hi all

    I had the same error. I had to download the gurobipy file hier gurobipy · PyPI save where I have Python installed and then run:

    python -m pip install --ignore-installed file

    I hope it helps

    Regards,

    Diego

    0

Post is closed for comments.