# BUG: module 'TubeTK' has no attribute 'swig'

**URL:** https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947
**Category:** Engineering
**Created:** [April 15, 2020, 5:25pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947 "2020-04-15T17:25:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![TaoH](https://discourse.itk.org/user_avatar/discourse.itk.org/taoh/32/1374_2.png) [@TaoH](https://discourse.itk.org/u/TaoH)
#### Post date: [April 15, 2020, 5:25pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/1 "2020-04-15T17:25:15Z")

</div>

Hello,  
Thanks for your effort for InsightToolkit-5.1rc3! And I have installed tubetk with _pip install itk-tubetk_. The bug was reported when I tested the example _ConvertTubesToImage.ipynb_

 ![image](https://discourse.itk.org/uploads/default/original/2X/2/2faeaa61e36475cbb9f076fa391ba30ea11d0d95.png)

How can I handle the problem?  
Thank you for help!  
TaoH

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [April 15, 2020, 6:42pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/2 "2020-04-15T18:42:03Z")

</div>

@Stephen_Aylward is this expected?

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 15, 2020, 11:52pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/3 "2020-04-15T23:52:57Z")

</div>

Hello @TaoH,

You should observe this:

 ![image](https://discourse.itk.org/uploads/default/original/2X/8/8cf5d9a62c25faf96813c0d731d70391a73b90c7.jpeg)

What are the versions of the itk packages? Ensure they are updated to 5.1rc3 with:

```auto
python -m pip install --upgrade pip
python -m pip install --upgrade --pre itk

```

---

<div class="post-metadata">

### Author: ![TaoH](https://discourse.itk.org/user_avatar/discourse.itk.org/taoh/32/1374_2.png) [@TaoH](https://discourse.itk.org/u/TaoH)
#### Post date: [April 16, 2020, 2:31am UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/4 "2020-04-16T02:31:32Z")

</div>

Hello,  
Thanks for your reply! I confirm that I install InsightToolkit-5.1rc3. And _ITKSpatialObjects-SimpleExample.ipynb_ is no problem for testing, but the bug is reported in _ConvertTubesToImage.ipynb_.

 ![image](https://discourse.itk.org/uploads/default/original/2X/a/a9ec93b9fde31afefa6f4fd2a6c08c4965808ae9.png)  
Best Wishes,  
TaoH

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 17, 2020, 1:31pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/5 "2020-04-17T13:31:26Z")

</div>

Thanks, I will try to reproduce this.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [May 14, 2020, 2:02am UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/6 "2020-05-14T02:02:26Z")

</div>

Hello @TaoH,

A new version of `itk-tubetk` is available – please try

```auto
python -m pip install --upgrade itk-tubetk itk itkwidgets

```

---

<div class="post-metadata">

### Author: ![TaoH](https://discourse.itk.org/user_avatar/discourse.itk.org/taoh/32/1374_2.png) [@TaoH](https://discourse.itk.org/u/TaoH)
#### Post date: [May 14, 2020, 4:00pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/7 "2020-05-14T16:00:44Z")

</div>

> [@matt.mccormick](#):
>
> python -m pip install --upgrade itk-tubetk itk itkwidgets

Hello,  
Thanks for your efforts! I have run the command that you recommended. However, I have another problem in this project.

 ![image](https://discourse.itk.org/uploads/default/original/2X/a/abed1eed178ff139d712807aa16728503a9645c8.png)  
 ![image](https://discourse.itk.org/uploads/default/original/2X/2/24bd6e8624d8d92ac94e799bc9a310c2903b7445.png)  
I think that this problem is in itk. Colud you provide some advice?

Best Wishes,  
TaoH

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [May 14, 2020, 5:26pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/8 "2020-05-14T17:26:45Z")

</div>

Hi,

What Python version do you have?

---

<div class="post-metadata">

### Author: ![TaoH](https://discourse.itk.org/user_avatar/discourse.itk.org/taoh/32/1374_2.png) [@TaoH](https://discourse.itk.org/u/TaoH)
#### Post date: [May 19, 2020, 7:19am UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/10 "2020-05-19T07:19:38Z")

</div>

Hello,@ [matt.mccormick](https://discourse.itk.org/u/matt.mccormick)  
The Python version I used is 3.7.4

---

<div class="post-metadata">

### Author: ![jbi35](https://discourse.itk.org/user_avatar/discourse.itk.org/jbi35/32/1039_2.png) [@jbi35](https://discourse.itk.org/u/jbi35)
#### Post date: [May 28, 2020, 5:22pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/11 "2020-05-28T17:22:09Z")

</div>

Hi,  
is there any update on this? I’ve basically run into the same problem. I’ve created a new conda environment using the following steps.

```
conda create --name tubetk python
conda activate tubetk2
pip install user ipykernel
conda install jupyter
pip install --pre itk
pip install itk-tubetk
pip install itkwidgets

```

When I try to run the second cell in `ComputeVesselProbabilityImageFromBrainMRIs.ipynb`, I first get this error message:

`ModuleNotFoundError: No module named '_itkInterpolateImageFunctionPython'`

When I run the cell a second time, however, I receive:

`AttributeError: module 'itk.TubeTKPython' has no attribute 'swig'`

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 8, 2020, 10:07pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/12 "2020-06-08T22:07:38Z")

</div>

We are working on a new package version.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 17, 2020, 6:24pm UTC](https://discourse.itk.org/t/bug-module-tubetk-has-no-attribute-swig/2947/13 "2020-06-17T18:24:33Z")

</div>

`itk-tubetk` version `0.2.1` packages are available, installable with:

```auto
python -m pip install --upgrade itk-tubetk

```
