<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I had several versions of Python installed. I removed the version at /Library/Frameworks and reinstalled Python 2.7 using Homebrew. I then followed the advice of the guide and setup a virtual environment within my project (called ecvenv), installed pip, upgraded pip, and used it to install SimpleITK. It installed the one you recommended earlier, v0.9.1. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default">







<p class=""><font face="monospace, monospace"><span class="">(ecvenv) </span><span class=""><b>➜  </b></span><span class=""><b>econtour</b></span><span class=""> </span><span class=""><b>git:(</b></span><span class=""><b>master</b></span><span class=""><b>) </b></span><span class=""><b>✗</b></span><span class=""> pip install  --trusted-host <a href="http://www.simpleitk.org" target="_top" rel="nofollow" link="external">www.simpleitk.org</a> -f <a href="http://www.simpleitk.org/SimpleITK/resources/software.html" target="_top" rel="nofollow" link="external">http://www.simpleitk.org/SimpleITK/resources/software.html</a> --timeout 30 SimpleITK</span></font></p>
<p class=""><span class=""><font face="monospace, monospace">Collecting SimpleITK</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">  Downloading <a href="https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9.1/Python/SimpleITK-0.9.1-cp27-none-macosx_10_6_intel.whl" target="_top" rel="nofollow" link="external">https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9.1/Python/SimpleITK-0.9.1-cp27-none-macosx_10_6_intel.whl</a> (72.6MB)</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">    100% |████████████████████████████████| 72.6MB 43.5MB/s </font></span></p>
<p class=""><span class=""><font face="monospace, monospace">Installing collected packages: SimpleITK</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">Successfully installed SimpleITK-0.9.1</font></span></p></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">However, I continue to run into a "Fatal Python Error" when trying to load simple itk from within python. See below:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default">







<p class=""><font face="monospace, monospace"><span class="">(ecvenv) </span><span class=""><b>➜  </b></span><span class=""><b>econtour</b></span><span class=""> </span><span class=""><b>git:(</b></span><span class=""><b>master</b></span><span class=""><b>) </b></span><span class=""><b>✗</b></span><span class=""> which python</span></font></p>
<p class=""><span class=""><font face="monospace, monospace">/Users/neil/work/Meteor/econtour/ecvenv/bin/python</font></span></p>
<p class=""><font face="monospace, monospace"><span class="">(ecvenv) </span><span class=""><b>➜  </b></span><span class=""><b>econtour</b></span><span class=""> </span><span class=""><b>git:(</b></span><span class=""><b>master</b></span><span class=""><b>) </b></span><span class=""><b>✗</b></span><span class=""> which pip</span></font></p>
<p class=""><span class=""><font face="monospace, monospace">/Users/neil/work/Meteor/econtour/ecvenv/bin/pip</font></span></p>
<p class=""><font face="monospace, monospace"><span class="">(ecvenv) </span><span class=""><b>➜  </b></span><span class=""><b>econtour</b></span><span class=""> </span><span class=""><b>git:(</b></span><span class=""><b>master</b></span><span class=""><b>) </b></span><span class=""><b>✗</b></span><span class=""> pip list</span></font></p>
<p class=""><span class=""><font face="monospace, monospace">pip (8.1.2)</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">setuptools (23.0.0)</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">SimpleITK (0.9.1)</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">wheel (0.29.0)</font></span></p>
<p class=""><font face="monospace, monospace"><span class="">(ecvenv) </span><span class=""><b>➜  </b></span><span class=""><b>econtour</b></span><span class=""> </span><span class=""><b>git:(</b></span><span class=""><b>master</b></span><span class=""><b>) </b></span><span class=""><b>✗</b></span><span class=""> python</span></font></p>
<p class=""><span class=""><font face="monospace, monospace">Python 2.7.11 (default, Jan 22 2016, 08:29:18) </font></span></p>
<p class=""><span class=""><font face="monospace, monospace">[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">Type "help", "copyright", "credits" or "license" for more information.</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">>>> import SimpleITK as sitk</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">Fatal Python error: PyThreadState_Get: no current thread</font></span></p>
<p class=""><span class=""><font face="monospace, monospace">[1]    2805 abort      python</font></span></p><p class=""><span class=""><font face="monospace, monospace"><br></font></span></p><p class=""><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 17, 2016 at 9:56 AM, Bradley Lowekamp [via ITK - Users] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=37270&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">

        Hi,
<br><br>Where did you get you python from? You are using a version from /Library/Framework/Python.frameworks, which is not the system version.
<br><br>The error with the first command gives you a suggestion on how to solve the problem. 
<br><br>The second error appears to be a binary compatibility issue with the distribution you have of python.
<br><br>Please read the guidance on the wiki with the different distributions of python, along with following the recommendation to setup a virtual environment.
<br><br><a href="https://itk.org/Wiki/SimpleITK/GettingStarted" rel="nofollow" link="external" target="_blank">https://itk.org/Wiki/SimpleITK/GettingStarted</a><br><br>Good luck,
<br></span>Brad
<br><br><br><br><div><div><div class="h5"><div class='shrinkable-quote'><br>> On Jun 17, 2016, at 11:20 AM, paniwani <<a href="http:///user/SendEmail.jtp?type=node&node=37269&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
<br>> 
<br>> Hi, 
<br>> 
<br>> It appears the code that I pasted did not show up in the email version of
<br>> the mailing list. I've re-pasted below. I'm using system Python 2.7 and Mac
<br>> OSX El Capitan. Thank you!
<br>> 
<br>> -----
<br>> 
<br>> I was using simple ITK with python in my application with no problems until
<br>> I recently upgraded to El Capitan on my Mac. Since then, I have received
<br>> error messages regarding 64-bit issues. I've tried to reinstall simple ITK
<br>> multiple times using the python binaries as stated here
<br>> <a href="https://itk.org/Wiki/SimpleITK/GettingStarted#Python_binary_files" rel="nofollow" link="external" target="_blank">https://itk.org/Wiki/SimpleITK/GettingStarted#Python_binary_files</a> with both
<br>> pip and easy_install. However, I continue to run into issues running
<br>> simpleITK. 
<br>> 
<br>> I am on OSX El Capitan (10.11) and Python 2.7. 
<br>> 
<br>> Here is the output when I try to install the latest via pip and and use it: 
<br>> 
<br>> ➜  Downloads sudo pip install  --trusted-host <a href="http://www.simpleitk.org" target="_blank" rel="nofollow" link="external">www.simpleitk.org</a> -f
<br>> <a href="http://www.simpleitk.org/SimpleITK/resources/software.html" rel="nofollow" link="external" target="_blank">http://www.simpleitk.org/SimpleITK/resources/software.html</a> --timeout 30
<br>> SimpleITK
<br>> The directory '/Users/neil/Library/Caches/pip/http' or its parent directory
<br>> is not owned by the current user and the cache has been disabled. Please
<br>> check the permissions and owner of that directory. If executing pip with
<br>> sudo, you may want sudo's -H flag.
<br>> The directory '/Users/neil/Library/Caches/pip' or its parent directory is
<br>> not owned by the current user and caching wheels has been disabled. check
<br>> the permissions and owner of that directory. If executing pip with sudo, you
<br>> may want sudo's -H flag.
<br>> Collecting SimpleITK
<br>>  Downloading
<br>> <a href="https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9.1/Python/SimpleITK-0.9.1-cp27-none-macosx_10_6_intel.whl" rel="nofollow" link="external" target="_blank">https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.9.1/Python/SimpleITK-0.9.1-cp27-none-macosx_10_6_intel.whl</a><br>> (72.6MB)
<br>>    100% |████████████████████████████████| 72.6MB 41.9MB/s 
<br>> Installing collected packages: SimpleITK
<br>> Successfully installed SimpleITK-0.9.1
<br>> ➜  Downloads python
<br>> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
<br>> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
<br>> Type "help", "copyright", "credits" or "license" for more information.
<br>>>>> import SimpleITK as sitk
<br>> Traceback (most recent call last):
<br>>  File "<stdin>", line 1, in <module>
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/__init__.py", line 1, in
<br>> <module>
<br>>    from .SimpleITK import *
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/SimpleITK.py", line 28,
<br>> in <module>
<br>>    _SimpleITK = swig_import_helper()
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/SimpleITK.py", line 24,
<br>> in swig_import_helper
<br>>    _mod = imp.load_module('_SimpleITK', fp, pathname, description)
<br>> ImportError: /Library/Frameworks/Python.framework/Versions/2.7/Python: no
<br>> appropriate 64-bit architecture (see "man python" for running in 32-bit
<br>> mode)
<br>>>>> 
<br>> 
<br>> I also tried to download a separate binary which I thought would be more
<br>> applicable for El Capitan (Mac OSX v10.11): 
<br>> 
<br>> SimpleITK-0.9.0-cp27-none-macosx_10_6_intel.macosx_10_7_intel.macosx_10_8_intel.macosx_10_9_intel.macosx_10_10_intel.whl 
<br>> 
<br>> However, I received the same error message: 
<br>> 
<br>> ➜  Downloads sudo pip install
<br>> SimpleITK-0.9.0-cp27-none-macosx_10_6_intel.macosx_10_7_intel.macosx_10_8_intel.macosx_10_9_intel.macosx_10_10_intel.whl
<br>> The directory '/Users/neil/Library/Caches/pip/http' or its parent directory
<br>> is not owned by the current user and the cache has been disabled. Please
<br>> check the permissions and owner of that directory. If executing pip with
<br>> sudo, you may want sudo's -H flag.
<br>> The directory '/Users/neil/Library/Caches/pip' or its parent directory is
<br>> not owned by the current user and caching wheels has been disabled. check
<br>> the permissions and owner of that directory. If executing pip with sudo, you
<br>> may want sudo's -H flag.
<br>> Processing
<br>> ./SimpleITK-0.9.0-cp27-none-macosx_10_6_intel.macosx_10_7_intel.macosx_10_8_intel.macosx_10_9_intel.macosx_10_10_intel.whl
<br>> Installing collected packages: SimpleITK
<br>> Successfully installed SimpleITK-0.9.0
<br>> ➜  Downloads python
<br>> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
<br>> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
<br>> Type "help", "copyright", "credits" or "license" for more information.
<br>>>>> import SimpleITK as sitk
<br>> Traceback (most recent call last):
<br>>  File "<stdin>", line 1, in <module>
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/__init__.py", line 1, in
<br>> <module>
<br>>    from .SimpleITK import *
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/SimpleITK.py", line 28,
<br>> in <module>
<br>>    _SimpleITK = swig_import_helper()
<br>>  File "/Library/Python/2.7/site-packages/SimpleITK/SimpleITK.py", line 24,
<br>> in swig_import_helper
<br>>    _mod = imp.load_module('_SimpleITK', fp, pathname, description)
<br>> ImportError: /Library/Frameworks/Python.framework/Versions/2.7/Python: no
<br>> appropriate 64-bit architecture (see "man python" for running in 32-bit
<br>> mode)
<br>>>>> 
<br>> 
<br>> Any help to get simpleITK in python working again would be appreciated.
<br>> Thanks in advance! 
<br>> 
<br>> Neil 
<br>> 
<br>> 
<br>> 
</div></div></div>> --
<div class='shrinkable-quote'><br>> View this message in context: <a href="http://itk-users.7.n7.nabble.com/Simple-ITK-Python-not-working-on-Mac-El-Capitan-10-11-tp37265p37268.html" rel="nofollow" link="external" target="_blank">http://itk-users.7.n7.nabble.com/Simple-ITK-Python-not-working-on-Mac-El-Capitan-10-11-tp37265p37268.html</a><span class=""><br>> Sent from the ITK - Users mailing list archive at Nabble.com.
<br>> _____________________________________
<br>> Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br>> 
<br>> Visit other Kitware open-source projects at
<br>> <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>> 
<br>> Kitware offers ITK Training Courses, for more information visit:
<br>> <a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" target="_blank">http://www.kitware.com/products/protraining.php</a><br>> 
<br>> Please keep messages on-topic and check the ITK FAQ at:
<br>> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>> 
<br>> Follow this link to subscribe/unsubscribe:
<br>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a></span></div><span class=""></div>_____________________________________
<br>Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br><br>Visit other Kitware open-source projects at
<br><a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:
<br><a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:
<br><a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>

        
        
        
        <br>
        <br>
        </span><hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><span class="">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </span><a href="http://itk-users.7.n7.nabble.com/Simple-ITK-Python-not-working-on-Mac-El-Capitan-10-11-tp37265p37269.html" target="_blank" rel="nofollow" link="external">http://itk-users.7.n7.nabble.com/Simple-ITK-Python-not-working-on-Mac-El-Capitan-10-11-tp37265p37269.html</a>
        </div><div class="HOEnZb"><div class="h5">
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Simple ITK Python not working on Mac El Capitan (10.11), <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Neil Panjwani<br>Duke University | B.S.E. 2010<br>Tel: (760) 486-0765</div>
</div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Simple-ITK-Python-not-working-on-Mac-El-Capitan-10-11-tp37265p37270.html">Re: [ITK-users] Simple ITK Python not working on Mac El Capitan (10.11)</a><br/>
Sent from the <a href="http://itk-users.7.n7.nabble.com/">ITK - Users mailing list archive</a> at Nabble.com.<br/>