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
scipy 0.17.1/0.18/0.19 packages built incorrectly #899
Comments
Ouch, the perils of |
Yup can confirm I had this problem as well, the fix for me was to also to downgrade to 0.17.0
EDIT: Turns out this can manifest because of a custom value set for DYLD_FALLBACK_LIBRARY_PATH You can try: $ unset DYLD_FALLBACK_LIBRARY_PATH If scipy works after that, you may choose to add $ DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$(HOME)/lib:/usr/local/lib:/lib:/usr/lib" A note to the anaconda maintainers, I believe that this is still an error, scipy should be linking |
Update: The new latest scipy version (0.18.0) also has the same problem. In case it's somehow useful, the conda-forge package for scipy is not broken in this way. |
I am getting similar error with virtual environments built around scipy 0.16.x - 0.18 on OSX 10.11.6 ImportError: dlopen(/Users/.../anaconda/lib/python2.7/site-packages/scipy/special/_ufuncs.so, 2): Library not loaded: /usr/local/lib/libgcc_s.1.dylib EDIT: It looks like any import from scipy fails with same error on my MacBook. @andykitchen workaround works |
@andykitchen You saved the day for me. |
@ilanschnell Is there any plan to fix this? |
FYI, this is still a problem with the latest scipy packages (0.19.0) from the defaults channel. As a workaround, I've created a custom
Anyway, here's the script: #!/bin/bash
# scipy-post-link.sh
#
# This is a post-link script for the scipy package, to work around
# a problem with how those binaries are built.
# For details, see:
# https://github.com/ContinuumIO/anaconda-issues/issues/899
#
if [ $(uname) != "Darwin" ];
then
# Nothing to do
exit 0
fi
if [ -z "$PREFIX" ];
then
1>&2 echo "PREFIX is undefined! Exiting."
exit 1
fi
#
# The .so files in the scipy package link against /usr/local/lib/libgcc_s.1.dylib, which is bad.
# Here, we replace those bad links with /usr/lib/libSystem.B.dylib
#
for f_dylib in $(find ${PREFIX}/lib/python2.7/site-packages/scipy -type f -name "*.so");
do
if otool -L $f_dylib | grep --quiet '/usr/local/lib/libgcc_s.1.dylib';
then
cmd="install_name_tool -change /usr/local/lib/libgcc_s.1.dylib /usr/lib/libSystem.B.dylib $f_dylib"
echo $cmd
$cmd
fi
done
|
Thanks. I'm going to fix the issue by basically adding the relink step to the build script in the scipy recipe on OSX. |
Excellent. In case you want to see what the resulting
Note: By replacing $ otool -L /miniconda2/envs/test-scipy/lib/python2.7/site-packages/scipy/linalg/_flinalg.so
/miniconda2/envs/test-scipy/lib/python2.7/site-packages/scipy/linalg/_flinalg.so:
@rpath/libmkl_intel_lp64.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmkl_intel_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libmkl_core.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libiomp5.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1.0.0) Indeed, Apple's own version of
... the only problem, for our purposes, is that it lives in |
This has been fixed since the release of AD5. |
The latest version (
0.17.10.18.0) of Anaconda's scipy package for OS X was built to link against/usr/local/lib/libgcc_s.1.dylib
, which is bad. The previous version (0.17.0) does not have this problem.On my machine, the bad links don't cause problems, but on my colleague's machine, it causes an error when he tries to import certain modules.
For example, somehow this scipy problem causes an error when importing
sklearn
:The text was updated successfully, but these errors were encountered: