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

DeerLab setup.py should not force numpy+mkl and other Gohlke libraries #322

Closed
mtessmer opened this issue Apr 21, 2022 · 2 comments · Fixed by #330
Closed

DeerLab setup.py should not force numpy+mkl and other Gohlke libraries #322

mtessmer opened this issue Apr 21, 2022 · 2 comments · Fixed by #330

Comments

@mtessmer
Copy link
Collaborator

Currently, the default setup.py will install the latest NumPy, SciPy, and cvxopt from the Gohlke unofficial windows binaries repository (for windows computers). Many users may not want to use mkl libraries or require different versions of NumPy, SciPy, or cvxopt for compatibility reasons. DeerLab should check if sufficient versions of these packages are already installed before downloading. It may be prudent to add a warning or recommendation if windows users do not have mkl versions or have older versions of these libraries.

@luisfabib
Copy link
Collaborator

Good point! A short explanation (not an excuse): back in the day, I set it up for MKL to be the default backend for Numpy-based packages due to the significant speed-up it provided to DeerLab. Since the MKL installation was complicated for me (back then, I was a Python neophyte), I set it such that the default installation for Windows users would be with MKL.

I fully agree that it should not enforce if users already have a Numpy/Scipy/CVXOpt installation. What do you think would be best?

  1. A simple warning about the presence of pre-existing package installations and DeerLab overwriting them.
  2. A Yes/No prompt during the installation to ask whether to install and/or overwritten with the MKL versions.
  3. Add an optional argument --mkl to the installer to install with the MKL backend on Windows computers and reset the default installation to the base Numpy without MKL.

@luisfabib
Copy link
Collaborator

luisfabib commented Jun 2, 2022

My proposal:

  • Standardize the setup.py script to modern standards enabling the distribution of DeerLab via wheels and more safe means.
  • Avoids the issues pointed out by @mtessmer when enforcing Gohlke's binaries on users.
  • Add an additional script, optional for windows users which automates the upgrade to the MKL-linked packages (basically the script we use now for the installation).

This would extremely simplify the installation of DeerLab and avoid future problems (particularly once I am not 100% dedicated to this project).

Cons:

  • The average Windows user of DeerLab will experience a somewhat slower performance without the MKL backend. (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants