[ITK-users] using simpleITK with anaconda python distribution

Matt McCormick matt.mccormick at kitware.com
Wed Sep 10 08:22:44 EDT 2014


Hi,

I think the best route is to use their package build system so the
build environment is set up correctly.  However, the SimpleITK package
may need some tweaks.

HTH,
Matt

On Wed, Sep 10, 2014 at 2:27 AM, Vishwa <vishwanath.somashekar at gmail.com> wrote:
> I tried installing again. Get the same error. Any ideas as to why this might
> be happening? or how to even debug the issue?
>
> Vishwa
>
> On Tue, Sep 9, 2014 at 10:44 PM, Matt McCormick <matt.mccormick at kitware.com>
> wrote:
>>
>> Instructions to build the recipe are here [1], although there is
>> currently a bug in the clone url [2].
>>
>> The error you get is usually from using incompatible versions of
>> Python in the CMake configuration. Your screenshot in the first
>> message look good, but conda may be doing some  funny business.
>>
>> HTH,
>> Matt
>>
>> [1] http://conda.pydata.org/docs/build_tutorials/pkgs.html
>>
>> [2] https://github.com/conda/conda-recipes/pull/176
>>
>> On Tue, Sep 9, 2014 at 10:55 PM, Vishwa <vishwanath.somashekar at gmail.com>
>> wrote:
>> > Thanks for getting back to me.. I am not sure how to use the build.sh.
>> > Am i
>> > to create those variables mentioned in that file?
>> >
>> > In the previous mail, I forgot to mention after I compiled, I tried what
>> > you
>> > suggest here
>> >
>> > cd ${BUILD_DIR}/SimpleITK-build/Wrapping
>> > ${PYTHON} PythonPackage/setup.py install
>> >
>> > The last few lines of the output is shown below
>> >
>> > Installed
>> >
>> > /Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev584-py2.7-macosx-10.5-x86_64.egg
>> >
>> > Processing dependencies for SimpleITK==0.9.0.dev584
>> >
>> > Finished processing dependencies for SimpleITK==0.9.0.dev584
>> >
>> > However, when i import simple itk in python,
>> >
>> > import SimpleITK as sitk
>> >
>> > Fatal Python error: PyThreadState_Get: no current thread
>> >
>> > Abort trap: 6
>> >
>> >
>> > On Tue, Sep 9, 2014 at 9:41 PM, Matt McCormick
>> > <matt.mccormick at kitware.com>
>> > wrote:
>> >>
>> >> Hi dagarshall,
>> >>
>> >> There is a SimpleITK recipe for conda [1].  To install it from a
>> >> manual build, use the same commands at the end of build.sh:
>> >>
>> >> cd ${BUILD_DIR}/SimpleITK-build/Wrapping
>> >> ${PYTHON} PythonPackage/setup.py install
>> >>
>> >> HTH,
>> >> Matt
>> >>
>> >> [1] https://github.com/conda/conda-recipes/tree/master/simpleitk
>> >>
>> >> On Tue, Sep 9, 2014 at 10:33 PM, dagarshali <dagarshali at gmail.com>
>> >> wrote:
>> >> > I downloaded the source code for simple itk and complied it as
>> >> > instructed. In
>> >> > the cmake configuration, I changed the python paths according to
>> >> > using
>> >> > the
>> >> > python distribution of anaconda. I was able to compile it. I have
>> >> > attached a
>> >> > snapshot of the cmake configuration
>> >> >
>> >> >
>> >> > <http://itk-insight-users.2283740.n2.nabble.com/file/n7586179/Screen_Shot_2014-09-09_at_3.png>
>> >> > I am not sure what to do after the compiling.. If I enter import
>> >> > SimpleITK
>> >> > as sitk, I get a fatal python error. Can anybody please suggest how
>> >> > to
>> >> > overcome this problem?Thanks in advance.dagarshali
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> >
>> >> > http://itk-insight-users.2283740.n2.nabble.com/using-simpleITK-with-anaconda-python-distribution-tp7586179.html
>> >> > Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> >> > _____________________________________
>> >> > 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
>> >
>> >
>> >
>> > _____________________________________
>> > 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 Insight-users mailing list