# Slicer Crashing on importing antspynet (macOS M3)

**URL:** <https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154>\
**Category:** Development\
**Created:** [September 2, 2024, 1:44pm UTC](https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154 "2024-09-02T13:44:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IVarha](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ivarha/32/66704_2.png) [@IVarha](https://discourse.slicer.org/u/IVarha)\
**Post date:** [September 2, 2024, 1:44pm UTC](https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154/1 "2024-09-02T13:44:44Z")

</div>

Hello I am creating a slicer extension and using antspynet in my development. Previously I used it on windows and it was working fine. I tried to install it in windows environment and it worked well.  
I tested imports on my python 3.9 local instance. It works for it.

I tested it with python provided by slicer as well but not get any meaningful logs:

PyDev console: starting.  
Python 3.9.10 (main, Apr 5 2024, 00:33:09)  
[Clang 14.0.6 ([https://github.com/tru/llvm-release-build](https://github.com/tru/llvm-release-build) 686807a176470032c208f2 on darwin  
import antspynet  
error: [/Applications/Slicer.app/Contents/bin/./python-real] exit abnormally - Report the problem.  
Process finished with exit code 1

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 12, 2024, 1:44am UTC](https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154/2 "2024-09-12T01:44:43Z")

</div>

It seems that antspynet uses tensorflow. Since the medical image computing community largely switched to pytorch, Slicer core developers no longer invest time into tensorflow support. If you need to use tensorflow then you need to investigate this issue yourself (if you have any specific questions then feel free to ask here), or you can install a Python environment where tensorflow works and call that from Slicer.

---

<div class="post-metadata">

**Author:** ![IVarha](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ivarha/32/66704_2.png) [@IVarha](https://discourse.slicer.org/u/IVarha)\
**Post date:** [September 16, 2024, 8:27am UTC](https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154/3 "2024-09-16T08:27:27Z")

</div>

> [@lassoan](#):
>
> you can install a Python environment where tensorflow works and call that from Slicer

That is exactly what I used in the end.

> [@lassoan](#):
>
> Slicer core developers no longer invest time into tensorflow support

Is there any reason why it fails in Slicer but works on general python environment? I have some problems with debugging it as I even don’t see any reasonable failing logs. Maybe it is possible to allow user use their installed python instance instead of PythonSlicer?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 17, 2024, 3:59pm UTC](https://discourse.slicer.org/t/slicer-crashing-on-importing-antspynet-macos-m3/38154/4 "2024-09-17T15:59:09Z")

</div>

> [@IVarha](#):
>
> Is there any reason why it fails in Slicer but works on general python environment? I have some problems with debugging it as I even don’t see any reasonable failing logs. Maybe it is possible to allow user use their installed python instance instead of PythonSlicer?

Most likely library and build chain clashes…
