Issue with updating gurobipy version
回答済みI 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.
-
正式なコメント
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. -
Hi Jun,
Can you try with the following?
python -m pip install
--ignore-installedgurobipy==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-dirgurobipy- 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
投稿コメントは受け付けていません。
コメント
9件のコメント