Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use setup.py if Gurobi v >= 11.0.0 #3160

Closed

Conversation

Neves-P
Copy link
Contributor

@Neves-P Neves-P commented Feb 5, 2024

(created using eb --new-pr)

Needed by easybuilders/easybuild-easyconfigs#19794.

Addresses changes to the Gurobi installation procedure from v11.0.0 and onward, that does not allow for installation via setup.py. In fact, from v11.0.0 setup.py simply raises an exception and terminates the installation of gurobipy immediately.

I have added a check for the version number to handle such cases, which now install gurobipy via pip install. I have tested this approach on the HPC I have access to and it seems to work well.

run_cmd('python setup.py install --prefix=%s' % self.installdir)
else:
run_cmd(
'python -m pip install --find-links=%s --no-index --no-deps --ignore-installed \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this will work, the (big) downside of this approach is that this will make pip download the gurobipy wheel from PyPI, rather than letting EasyBuild download (and cache it).

I took a different approach in #3225 + easybuilders/easybuild-easyconfigs#19838, by simply disabling the use of setup.py, and installing gurobipy as an extension to Gurobi, which leaves EasyBuild in control of the downloading from PyPI...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that is indeed a much better solution. Feel free and close this and PR easybuilders/easybuild-easyconfigs#19838, or just ping me and I'll add a note and close them 👍

@boegel boegel added the update label Feb 13, 2024
@boegel boegel added this to the 4.x milestone Feb 13, 2024
@branfosj
Copy link
Member

close in favour of #3225

@branfosj branfosj closed this Feb 14, 2024
@Neves-P Neves-P deleted the 20240205140456_new_pr_gurobi branch February 14, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants