Closed PeterJacob closed 7 years ago
Ok, after more fiddling it seems like I got things to run. I had to copy libgfortran.3.dylib to a magic location.
mkdir -p /usr/local/opt/gcc/lib/gcc/6/
cp /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libgfortran.3.dylib /usr/local/opt/gcc/lib/gcc/6/
Thanks. That is good to know.
I'm encountering the same issue that @PeterJacob described. I'm running OS X version 10.11.6 (15G1217), and I've tried installing glmnet python via "pip install glmnet_py" and via the source installation instructions. In both cases the installation succeeds, and I'm able to "import glmnet_py" and "import glmnet_python," but when I run "glmnet(x = X.values.astype('float64'), y = y.values, family = 'cox')" in Python 3.6, I get the error
`--------------------------------------------------------------------------- OSError Traceback (most recent call last)
Peter,
Are you still having luck with the glmnet? I am wondering if I should add your fix to the FAQ. Please let us know if the fix actually worked for you.
On Thu, Jun 1, 2017 at 5:53 AM, Peter Smit notifications@github.com wrote:
Ok, after more fiddling it seems like I got things to run. I had to copy libgfortran.3.dylib to a magic location.
mkdir -p /usr/local/opt/gcc/lib/gcc/6/ cp /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libgfortran.3.dylib /usr/local/opt/gcc/lib/gcc/6/
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bbalasub1/glmnet_python/issues/13#issuecomment-305446333, or mute the thread https://github.com/notifications/unsubscribe-auth/AKpDE0ukiz0pewagdw1Gsgg2AGk5oIAnks5r_ooTgaJpZM4Nsr2l .
Is there a recommended fix for this? I'm getting the same issue on OSX 10.13.2
I have fixed the problem by first placing the libgfortran.3.dylib file in the location suggested by PeterJacob. First I located the file with:
$ sudo find / -name libgfortran.3.dylib
Next move the file as suggested:
mkdir -p /usr/local/opt/gcc/lib/gcc/6/
cp /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libgfortran.3.dylib
/usr/local/opt/gcc/lib/gcc/6/
After that I installed gfortran from here
Then it still did not work. The final step which fixed the problem for me was replacing my GLMnet.so
file with the one from a computer where the error was not happening. See the attached zip:
GLMnet.so.zip
During this process I replaced the old file so unfortunately I can not check what exactly the difference is which may be causing this trouble.
@mandycoston @bbalasub1 @lmackey
marnixkoops solution worked for me (using the path indicated in the error I was getting for moving the gfortran files)- thanks for uploading the file!
For me, this worked:
mkdir -p /usr/local/opt/gcc/lib/gcc/6/
cp /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libgfortran.3.dylib
/usr/local/opt/gcc/lib/gcc/6/
And replacing the GLMnet.so as @marnixkoops suggested. Interestingly, macOS Big Sur tried to block access to the .so file, so I've had to grant access first; maybe this is part of the problem? Thanks, in any case, for all these solutions!
Hi, I'm running Mac OS-X 10.12.3 (16D32). During the installation via pip there were no errors, but when I try to run a simple script fitting the model I get the following error. Does anyone understand what's going wrong?
A colleague of mine has the library running without problems, but doesn't remember how exactly.
The file mentions in the traceback (GLMnet.so) is the same as the one in the repo, but for some reason he has a file with different size. If I rename the version installed on my pc with his version I get the following traceback:
I tried installing Xcode + glibfortran for OS-X, but that doesn't help. Traceback is the same.