Open astrofrog opened 6 years ago
This happens on MacOS X with the following environment:
ca-certificates 2018.03.07 0
certifi 2018.4.16 py36_0
gdcm 2.8.4 py36_0 conda-forge
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libedit 3.1 hb4e282d_0
libffi 3.2.1 h475c297_4
ncurses 6.0 hd04f020_2
openssl 1.0.2o h26aff7b_0
pip 9.0.3 py36_0 conda-forge
python 3.6.5 hc167b69_1
readline 7.0 hc1231fa_4
setuptools 39.1.0 py36_0 conda-forge
sqlite 3.23.1 hf1716c9_0
tk 8.6.7 0 conda-forge
wheel 0.31.0 py36_0 conda-forge
xz 5.2.3 0 conda-forge
zlib 1.2.11 hf3cbc9b_2
but not with:
ca-certificates 2018.4.16 0 conda-forge
certifi 2018.4.16 py36_0
gdcm 2.8.4 py36_0 conda-forge
ncurses 5.9 10 conda-forge
openssl 1.0.2o h26aff7b_0
pip 9.0.3 py36_0 conda-forge
python 3.6.5 1 conda-forge
readline 7.0 0 conda-forge
setuptools 39.1.0 py36_0 conda-forge
sqlite 3.20.1 2 conda-forge
tk 8.6.7 0 conda-forge
wheel 0.31.0 py36_0 conda-forge
xz 5.2.3 0 conda-forge
zlib 1.2.11 hf3cbc9b_2
I believe this is related to mixed linking of different python installations on the system. But I've never seen anyone resolve this one, unfortunately, short of system reinstallation
Yeah, this is frustrating - most users won't necessarily want to mess around with environments and if they just conda install -c conda-forge gdcm
into their normal Anaconda environment things will break (e.g pydicom doesn't import).
@Korijn - it looks like this may be happening when loading libgdcmzlib
:
In [1]: import gdcmswig
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/python3.6/site-packages/_gdcmswig.so
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmMEXD.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmMSFF.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmIOD.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libpython3.6m.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmDSED.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmCommon.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmDICT.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libsocketxx.1.2.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmjpeg8.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmjpeg12.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmjpeg16.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmopenjp2.7.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmcharls.1.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmuuid.2.8.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmexpat.2.0.dylib
dyld: loaded: /Users/tom/miniconda3/envs/dev/lib/libgdcmzlib.2.8.dylib
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
Is there a way to compile GDCM such that it does not install its own libraries that could be installed in other ways in conda?
I've investigated this some more, and this seems to happen if Python is installed from defaults rather than from conda-forge, and only Python 3.x (not 2.x). With a clean conda installation, the bug is easy to reproduce with:
conda create -n test python=3.5
source activate test
conda install -y -c conda-forge gdcm
Importing gdcm then results in the above issue.
just a hint, this has to do with using a different python build at runtime than at buildtimr.
got the same issue, anyone has a solution?
I've installed gdcm from conda-forge into my conda environment and if I import it I get a fatal Python error: