rsnt_translations
56,437
edits
(Created page with "=== Versions Gurobi 11.0.0 (et plus récentes) ===") |
No edit summary |
||
Line 209: | Line 209: | ||
Next install gurobipy into the environment. As mentioned above and in [[https://support.gurobi.com/hc/en-us/articles/360044290292-How-do-I-install-Gurobi-for-Python|this article]] the use of setup.py to install Gurobi for python is deprecated starting with Gurobi 11. Both pip and conda are given as alternatives, however since conda should not be used on alliance systems, the pip approach will be demonstrated here. The installation of gurobipy is slightly complicated since Alliance linux systems are setup with gentoo prefix. As a result neither A) the recommended command to download and install the gurobipy extension from the public PyPI server <code>pip install gurobipy==11.0.1</code> mentioned in the article line or B) the offline command to install the wheel with <code>python -m pip install --find-links <wheel-dir> --no-index gurobipy</code>, will work. Instead a script available from the alliance maybe utilized to download and simultaneously convert the existing wheel into an usable format with a new name. There is one caveat, for each new Gurobi version the researcher must go into https://pypi.org/project/gurobipy/11.0.1/#history and click on the desired version followed by the <code>Download files</code> button located in the left hand menu. Finally click to copy the https link for the wheel file (named gurobipy-11.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl in the case of Gurobi 11.0.1) and paste it as the --url argument as shown below : | Next install gurobipy into the environment. As mentioned above and in [[https://support.gurobi.com/hc/en-us/articles/360044290292-How-do-I-install-Gurobi-for-Python|this article]] the use of setup.py to install Gurobi for python is deprecated starting with Gurobi 11. Both pip and conda are given as alternatives, however since conda should not be used on alliance systems, the pip approach will be demonstrated here. The installation of gurobipy is slightly complicated since Alliance linux systems are setup with gentoo prefix. As a result neither A) the recommended command to download and install the gurobipy extension from the public PyPI server <code>pip install gurobipy==11.0.1</code> mentioned in the article line or B) the offline command to install the wheel with <code>python -m pip install --find-links <wheel-dir> --no-index gurobipy</code>, will work. Instead a script available from the alliance maybe utilized to download and simultaneously convert the existing wheel into an usable format with a new name. There is one caveat, for each new Gurobi version the researcher must go into https://pypi.org/project/gurobipy/11.0.1/#history and click on the desired version followed by the <code>Download files</code> button located in the left hand menu. Finally click to copy the https link for the wheel file (named gurobipy-11.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl in the case of Gurobi 11.0.1) and paste it as the --url argument as shown below : | ||
{{Commands|prompt=(env_gurobi) [name@server ~] $ | {{Commands|prompt=(env_gurobi) [name@server ~] $ | ||
| | | wget https://raw.githubusercontent.com/ComputeCanada/wheels_builder/main/unmanylinuxize.sh | ||
| chmod u+rx unmanylinuxize.sh | |||
| ./unmanylinuxize.sh --package gurobipy --version 11.0.1 --url | |||
https://files.pythonhosted.org/packages/1c/96/4c800e7cda4a1688d101a279087646912cf432b0f61ff5c816f0bc8503e0/gurobipy-11.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | |||
| ls | |||
gurobipy-11.0.1-cp311-cp311-linux_x86_64.whl unmanylinuxize.sh | |||
| python -m pip install --find-links $PWD --no-index gurobipy | |||
| deactivate | |||
[name@server ~]}} | |||
| | |||
}} | |||
<div class="mw-translate-fuzzy"> | <div class="mw-translate-fuzzy"> |