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

Support to MacOS #67

Open
Nikeshbajaj opened this issue Jul 16, 2023 · 1 comment
Open

Support to MacOS #67

Nikeshbajaj opened this issue Jul 16, 2023 · 1 comment

Comments

@Nikeshbajaj
Copy link

Hi, I have been using glmnet_python on linux, but couldn't run in on MacOS, even though the conda-forge channel indicates the support of OSX-64 (https://anaconda.org/conda-forge/glmnet_py).

I tried both, installing using conda forge, pip and even tried with compiling from source, yet I keep getting same error.

OSError: glmnet_python/GLMnet.so' (not a mach-o file)

Is there anyway to fix that or only linux is the option?

@petomajci
Copy link

petomajci commented May 16, 2024

I managed to get glmnet_python running on my apple M3 Pro by installing gfortran with x86_64 architecture specific homebrew by following this guide: https://sixty-north.com/blog/pyenv-apple-silicon.html

Namely these are the steps that solved it for me:

  1. make the command brew86 available according to above blog
  2. brew uninstall gfortran - to uninstall arm gfortran (to make sure the x86_64 version is used for building the .so binary)
  3. brew86 install gfortran (install x86_64 gfortran)
  4. delete the committed GLMnet.so file
  5. pip uninstall glmnet_python (uninstall previously installed package)
  6. pip install . ... this got me a functional glmnet_python and GLMnet.so on my apple M3 Pro

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

No branches or pull requests

2 participants