-
Notifications
You must be signed in to change notification settings - Fork 216
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
Import Error - dlopen Expected in: flat namespace #19
Comments
Hi, I had a similar issue a while back ago that was caused by some strange compiler/conda combination. Could you try the following:
Btw, using stardist on OSX might not be ideal, as OSX doesn't support tensorflow/GPU (a general limitation) and training will take very long :) |
Hey @maweigert Thank you for the quick reply. Yes I am just toying around with the utils on my local machine to get a feel for it. Once I have a better understanding I will install it on our cluster (running cent OS). I followed your two steps. The installation was successful. Unfortunately I get the same error: | => python3
Could the issue be with python? I noticed just now the lines: 019, 02:16:08) when I load python3 in command line. Also I find that this gcc (gcc-8) or the other version (gcc-9) are not my default c compilers. When I run "which gcc" I get /usr/bin/gcc However when I run "gcc -v" I get: Using built-in specs. Any thoughts? Thanks, Andrew |
Hi, The gcc version differences are fine, as for the package to work it only matters which gcc was used during compilation (and both gcc-8 and gcc-9 should be fine). Could you provide the output of the following command?
|
Yes - | => DYLD_PRINT_LIBRARIES=1 python -c "import stardist;" 2>&1 | grep libgomp dyld: loaded: /Users/guest/anaconda3/lib/libgomp.1.dylib |
Yeah, so it uses the wrong library. Will be hard to debug.
which for me is Afterwards you can reset the lib dependencies:
Of course, this is only a temporary workaround. |
The first command gets me: | => otool -L /Users/guest/anaconda3/lib/python3.6/site-packages/stardist/lib/stardist3d.cpython-36m-darwin.so So our src is the same - @rpath/libgomp.1.dylib I have libgomp.1.dylib in the following: /usr/local/Cellar/gcc/9.2.0/lib/gcc/9/libgomp.1.dylib So I ran your second block with src the same, then my dst="/usr/local/Cellar/gcc/9.2.0/lib/gcc/9/libgomp.1.dylib" Afterwards I am able to import stardist. Thank you so much Martin. Why is this only a temporary workaround? |
Ha, great to hear that this worked! :)
Temporary was probably the wrong word - I meant something like "unsatisfactory ad-hoc workaround that doesn't really address the underlying problem" :) |
Fair enough - thanks again for your help. I'll let you know how your method works for our data |
That'd be great! Any feedback is appreciated |
Hahah, great! :) |
Hello, I've followed these steps and have now had a new error appear when importing Stardist: Reason: Incompatible library version: stardist2d.cpython-37m-darwin.so requires version 2.0.0 or later, but libgcc_s.1.dylib provides version 1.0.0 Is there a way to update libgcc_s.1.dylib? Any insight? Thanks! |
Hi, Now, I replaced the first path with a path to the same library, which is available in miniconda. However, there are no other versions of libSystems.B.dylib, which I can find on my Mac. I also tried to provide a path to the libSystems.B.tbd, which I found, but this didn't work. Do you have any idea why this would be? I also installed gcc11 and tried to build the github version, but it didn't work. Any suggestions would be appreciated. Thanks for your time! |
Hi, |
Finally it works !! i) install gcc13 with homebrew (su installation) ii) create symbolic links : iii) install stardist that's all folks ! |
Indeed this error seems to pop up from time to time on some envs in a rather annoying way. So thanks a lot for digging into it @blancfrederic ! |
Which Mac OS version are you using? On my system with 13.4.1 I tried your solution and couldn't make it work. I still get the same issues as @mihaela-mihaylova. |
@vgastaldi |
Thanks for the reply @blancfrederic! I have 13.4.1 here, but no idea if that would be the difference. Regarding the admin account, my account was not the first one created in the computer (IT did it first), but mine is marked as admin too. I do have a newer version of gcc installed, but I both followed your instructions and set aliases for it. |
@vgastaldi Hope you find a solution ! |
@vgastaldi, I've had a similar problems to what you'd encountered and the solutions above didn't help. If you still have the environment, |
Thanks for the reply! I Unfortunately it hasn't worked yet as the installation of numpy always returns an error. I will still try to figure this out. In the meantime I installed stardist in a Windows computer and it's running fine. |
Hello,
I've been trying to install stardist today.
Mac OSX Mojave 10.14.4
Anaconda 3.6.7
gcc-9 and g++-9 compilers
I run "pip install stardist":
| => pip install stardist
Collecting stardist
Requirement already satisfied: csbdeep>=0.4.0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from stardist) (0.4.1)
Requirement already satisfied: scikit-image in /Users/guest/anaconda3/lib/python3.6/site-packages (from stardist) (0.15.0)
Requirement already satisfied: numba in /Users/guest/anaconda3/lib/python3.6/site-packages (from stardist) (0.43.1)
Requirement already satisfied: numpy in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (1.16.4)
Requirement already satisfied: matplotlib in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (3.1.0)
Requirement already satisfied: keras>=2.1.2 in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (2.2.2)
Requirement already satisfied: tifffile in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (0.15.1)
Requirement already satisfied: tqdm in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (4.32.1)
Requirement already satisfied: h5py in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (2.9.0)
Requirement already satisfied: scipy in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (1.3.0)
Requirement already satisfied: six in /Users/guest/anaconda3/lib/python3.6/site-packages (from csbdeep>=0.4.0->stardist) (1.12.0)
Requirement already satisfied: networkx>=2.0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from scikit-image->stardist) (2.3)
Requirement already satisfied: pillow>=4.3.0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from scikit-image->stardist) (6.0.0)
Requirement already satisfied: imageio>=2.0.1 in /Users/guest/anaconda3/lib/python3.6/site-packages (from scikit-image->stardist) (2.5.0)
Requirement already satisfied: PyWavelets>=0.4.0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from scikit-image->stardist) (1.0.3)
Requirement already satisfied: llvmlite>=0.28.0dev0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from numba->stardist) (0.28.0)
Requirement already satisfied: python-dateutil>=2.1 in /Users/guest/anaconda3/lib/python3.6/site-packages (from matplotlib->csbdeep>=0.4.0->stardist) (2.8.0)
Requirement already satisfied: cycler>=0.10 in /Users/guest/anaconda3/lib/python3.6/site-packages (from matplotlib->csbdeep>=0.4.0->stardist) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/guest/anaconda3/lib/python3.6/site-packages (from matplotlib->csbdeep>=0.4.0->stardist) (2.4.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/guest/anaconda3/lib/python3.6/site-packages (from matplotlib->csbdeep>=0.4.0->stardist) (1.1.0)
Requirement already satisfied: keras-preprocessing==1.0.2 in /Users/guest/anaconda3/lib/python3.6/site-packages (from keras>=2.1.2->csbdeep>=0.4.0->stardist) (1.0.2)
Requirement already satisfied: pyyaml in /Users/guest/anaconda3/lib/python3.6/site-packages (from keras>=2.1.2->csbdeep>=0.4.0->stardist) (5.1)
Requirement already satisfied: keras-applications==1.0.4 in /Users/guest/anaconda3/lib/python3.6/site-packages (from keras>=2.1.2->csbdeep>=0.4.0->stardist) (1.0.4)
Requirement already satisfied: decorator>=4.3.0 in /Users/guest/anaconda3/lib/python3.6/site-packages (from networkx>=2.0->scikit-image->stardist) (4.4.0)
Requirement already satisfied: setuptools in /Users/guest/anaconda3/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->csbdeep>=0.4.0->stardist) (41.0.1)
Installing collected packages: stardist
Successfully installed stardist-0.3.4
Then on command: python -c "import stardist" I get:
Traceback (most recent call last):
File "", line 1, in
File "/Users/guest/anaconda3/lib/python3.6/site-packages/stardist/init.py", line 8, in
from .geometry import star_dist, polygons_to_label, relabel_image_stardist, ray_angles, dist_to_coord
File "/Users/guest/anaconda3/lib/python3.6/site-packages/stardist/geometry/init.py", line 5, in
from .geom2d import star_dist, polygons_to_label, relabel_image_stardist, ray_angles, dist_to_coord
File "/Users/guest/anaconda3/lib/python3.6/site-packages/stardist/geometry/geom2d.py", line 11, in
from ..lib.stardist2d import c_star_dist
ImportError: dlopen(/Users/guest/anaconda3/lib/python3.6/site-packages/stardist/lib/stardist2d.cpython-36m-darwin.so, 2): Symbol not found: _GOMP_loop_nonmonotonic_dynamic_next
Referenced from: /Users/guest/anaconda3/lib/python3.6/site-packages/stardist/lib/stardist2d.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/guest/anaconda3/lib/python3.6/site-packages/stardist/lib/stardist2d.cpython-36m-darwin.so
Any idea what I can do here. Happy to provide other information.
Thank you for the help!
The text was updated successfully, but these errors were encountered: