Comments (7)
I got similar error on my Mac. I only have gcc 10 but no 9. Basically, I install gcc 9 with brew, and link the installed folder to the one mentioned in the glmnet error:
brew install gcc@9
# installed in /usr/local/Cellar/gcc@9/9.3.0/
ln -s /usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9 /usr/local/opt/gcc/lib/gcc/9
from python-glmnet.
Any chance the version could be bumped and new wheels made for gcc 10 (+ python 3.9)?
from python-glmnet.
Hello, as far as I can tell, there have been no changes within setup.py
for compiling Fortran code in the past several years (the other changes I made a week ago for the v2.2.1 release don't seem to be related):
As for building the macosx wheels, I created them by running the python setup.py bdist_wheel
command, with python
being each of the Python versions we now support.
To improve the pip-install experience for Mac users, if having gcc installed would solve the issue, then perhaps we could more explicitly recommend brew install gcc
before running pip install glmnet
in the documentation (in the current readme, we mention brew install gcc
only in the paragraph about installing python-glmnet from source).
from python-glmnet.
Thanks for the quick response @jacksonllee. The issue is that currently brew install gcc && pip install glmnet && python -c "import glmnet"
does not work; I happened to have gcc==9.3
installed already, but now brew gives you gcc==10.1
, and the wheel is looking in the wrong place (hardcoded to gcc/9
.
I'm guessing it's looking for 9 because that's what you happened to have locally as well (and probably that's been the Homebrew version since the commit you linked to); I'm afraid I don't know enough to say how the explicit 9
is making it into the expected library path though...
from python-glmnet.
To confirm, I've just checked my Mac, and indeed it's on gcc 9.3. I also don't quite see how, if at all, the gcc version is hard-coded for building the wheels. One thing I can think of off the top of my head is that the Fortran compilation is done by the packaging tools imported from numpy which may be relevant to the issue at hand, but I'm not sure. We may also look at how other more established projects with Fortran code (scipy, etc.) build wheels and then we can emulate (the current set-up here is admittedly a couple years old and is probably due for maintenance). When our engineering resources allow it, we'll be able to look into this ticket more.
from python-glmnet.
I got similar error on my Mac. I only have gcc 10 but no 9. Basically, I install gcc 9 with brew, and link the installed folder to the one mentioned in the glmnet error:
brew install gcc@9 # installed in /usr/local/Cellar/gcc@9/9.3.0/ ln -s /usr/local/Cellar/gcc@9/9.3.0/lib/gcc/9 /usr/local/opt/gcc/lib/gcc/9
For now, this solution work on mac (Not M1). Thanks !
from python-glmnet.
Seems like the repo is kinda dead and no one is maintaining it!
from python-glmnet.
Related Issues (20)
- Extraneous __init__.py in root directory
- ValueError: _glmnet.lognet() 3rd keyword (isd) can't be converted to int
- Create new release for PIP past 2.0 HOT 2
- ElasticNet.predict returns 0d array on 1-row inputs
- attribute n_lambda_ may be less than specified n_lambda, but the selected coefficients vary a lot HOT 10
- Where to put 'lambda.1se' HOT 3
- Use external joblib and six packages, instead of sklearn.externals versions HOT 2
- lol
- BUG: ModuleNotFoundError: No module named '_glmnet' HOT 5
- Error with sklearn's make_scorer
- Error importing glmnetcv
- installing issue on Windows 10
- ElasticNet.fit raises ValueError when not converging instead of just issuing a warning HOT 1
- What can be the reason for different results compared to R glmnet?
- Python 3.9 Compatibility HOT 9
- LogitNet doesn't implement the `_estimator_type` attribute
- Package does not build with `--use-pep517` (with Poetry)
- Inaccurate porting of covariance vs naive method
- Unable to install for python in Windows using pip or conda
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-glmnet.