Issue with updating gurobipy version
AnsweredI attmpted to upgrade the gurobipi version using pip, as show below . Something went wrong. Thanks for your help.
python -m pip install gurobipy==10.0.1
ERROR: Cannot uninstall 'gurobipy'.
It is a distutils installed project and thus we cannot accurately determine
which files belong to it which would lead to only a partial uninstall.
-
Hi Jun,
Can you try with the following?
python -m pip install
--ignore-installed
gurobipy==10.0.1- Riley
0 -
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.00 -
Hmm this is strange. What version does "python -m pip list" show?
0 -
It's gurobipy 10.0.0
0 -
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 gurobipythen 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 -
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,
David0 -
Riley and David, Thanks for your help.
I'll try the method you suggested.
0 -
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
Please sign in to leave a comment.
Comments
8 comments