[ITK] [ITK-users] using simpleITK with anaconda python distribution

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Sep 10 10:13:10 EDT 2014


Hello,

This error message frequently happens when SimpleITK is compiled against a different version of  Python than the runtime. This generally indicate there is something conflicting funny in your runtime environment.

I was easily able to use the build script from the conda-recipes repository. I would strongly recommend this approach when building for the anaconda enviroment as it does simplify some of there issue. Your CMake configuration does look correct.

You should look at you environment variables, such as PATH, DYLD_LIBRARY_PATH, and PYTHONPATH. Additionally look in you user install path [1]. You are looking for multiple copies of the SimpleITK module or library and or python runtime libraries which could confuse the linker.

Also you can inspect the runtime libraries:

 otool -L /Users/blowekamp/anaconda//lib/python2.7/site-packages/SimpleITK/_SimpleITK.so
/Users/blowekamp/anaconda//lib/python2.7/site-packages/SimpleITK/_SimpleITK.so:
	@loader_path/../../../libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 2577.0.0)

[1] https://docs.python.org/2/install/#alternate-installation-the-user-scheme

Hope this helps,
Brad

On Sep 9, 2014, at 10:55 PM, Vishwa <vishwanath.somashekar at gmail.com> wrote:

> import SimpleITK as sitk
> 
> Fatal Python error: PyThreadState_Get: no current thread
> 
> 
> Abort trap: 6
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140910/44acbf3e/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list