bbalasub1 / glmnet_python

GNU General Public License v3.0
200 stars 95 forks source link

ValueError: loadGlmlib does not currently work for windows #60

Open OhIlder opened 2 years ago

OhIlder commented 2 years ago

Hello,Does this package not work on Windows?

cerdem12 commented 1 year ago

Second that question! Is this working for Windows or any plans on that? Thank you..

bbalasub1 commented 1 year ago

It should work just fine on windows.

cerdem12 commented 1 year ago

Hello, here is the the error message after installing glmnet_python, and running the glmnet_examples notebook:


ValueError Traceback (most recent call last) Cell In [5], line 2 1 # call glmnet ----> 2 fit = glmnet(x = x.copy(), y = y.copy(), family = 'gaussian', \ 3 weights = wts, \ 4 alpha = 0.2, nlambda = 20 5 )

File ~\anaconda3\envs\glmtest\lib\site-packages\glmnet_python\glmnet.py:448, in glmnet(x, y, family, **options) 445 ## finally call the appropriate fit code 446 if family == 'gaussian': 447 # call elnet --> 448 fit = elnet(x, is_sparse, irs, pcs, y, weights, offset, gtype, parm, 449 lempty, nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, 450 thresh, isd, intr, maxit, family) 451 elif (family == 'binomial') or (family == 'multinomial'): 452 # call lognet 453 fit = lognet(x, is_sparse, irs, pcs, y, weights, offset, parm, 454 nobs, nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, 455 thresh, isd, intr, maxit, kopt, family)

File ~\anaconda3\envs\glmtest\lib\site-packages\glmnet_python\elnet.py:17, in elnet(x, is_sparse, irs, pcs, y, weights, offset, gtype, parm, lempty, nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, thresh, isd, intr, maxit, family) 12 def elnet(x, is_sparse, irs, pcs, y, weights, offset, gtype, parm, lempty, 13 nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, thresh, isd, intr, 14 maxit, family): 15 16 # load shared fortran library ---> 17 glmlib = loadGlmLib() 19 # pre-process data
20 ybar = scipy.dot(scipy.transpose(y), weights)

File ~\anaconda3\envs\glmtest\lib\site-packages\glmnet_python\loadGlmLib.py:28, in loadGlmLib() 25 return(glmlib) 26 elif os.name == 'nt': 27 # this does not currently work ---> 28 raise ValueError('loadGlmlib does not currently work for windows') 29 # glmlib = ctypes.windll.LoadLibrary(glmnet_dll) 30 else: 31 raise ValueError('loadGlmLib not yet implemented for non-posix OS')

ValueError: loadGlmlib does not currently work for windowsrk for windows

reabbot commented 1 year ago

I am also getting this message. Is there a resolution to this?

jericholawson commented 1 year ago

I too am also getting this message. Any updates to this issue?