# itkwidgets \`compare\` error

**URL:** https://discourse.itk.org/t/itkwidgets-compare-error/5274
**Category:** Community
**Tags:** itkwidgets
**Created:** [August 17, 2022, 2:55pm UTC](https://discourse.itk.org/t/itkwidgets-compare-error/5274 "2022-08-17T14:55:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![edgar](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@edgar](https://discourse.itk.org/u/edgar)
#### Post date: [August 17, 2022, 2:55pm UTC](https://discourse.itk.org/t/itkwidgets-compare-error/5274/1 "2022-08-17T14:55:37Z")

</div>

Hello,  
(This could be related [Error when executing the Binder example: “compare images side by side” #455](https://github.com/InsightSoftwareConsortium/itkwidgets/issues/455))

It seems that the compare widget is missing:

```auto
ImportError Traceback (most recent call last)
Input In [1], in <cell line: 4>()
      2 import numpy as np
      3 import imageio
----> 4 from itkwidgets import view, compare, checkerboard

ImportError: cannot import name 'compare' from 'itkwidgets' (/home/edgar/.local/lib/python3.10/site-packages/itkwidgets/ __init__.py)

```

` __init__.py` does not require it, and it does not seem to exist in the directory, either (`ls /home/edgar/.local/lib/python3.10/site-packages/itkwidgets/`)

```auto
cm.py
__init__.py
__pycache__
static
trait_types.py
_transform_types.py
_version.py
widget_checkerboard.py
widget_line_profiler.py
widget_viewer.py

```

I tried [this](https://github.com/InsightSoftwareConsortium/ITKElastix/blob/master/examples/1_NumPyArray.ipynb) with a `jupyter-notebook` and a `jupyter-lab`:

```auto
import itk
import numpy as np
import imageio
from itkwidgets import view, compare, checkerboard

```

itkwidgets 0.20.0 (also with 1.08a; 0.32.2 is not installable)  
itk 5.3rc4  
jupyter-lab 3.4.4  
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0]  
IPython 8.4.0  
notebook server 6.4.12

---

<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: [August 23, 2022, 1:03am UTC](https://discourse.itk.org/t/itkwidgets-compare-error/5274/2 "2022-08-23T01:03:55Z")

</div>

> [@edgar](#):
>
> `python3.10`

After `itk-5.3.0` is published, we will bump the dependency in itkwidgets.

---

<div class="post-metadata">

### Author: ![AwesomeLemon](https://discourse.itk.org/user_avatar/discourse.itk.org/awesomelemon/32/3626_2.png) [@AwesomeLemon](https://discourse.itk.org/u/AwesomeLemon)
#### Post date: [August 10, 2023, 9:08am UTC](https://discourse.itk.org/t/itkwidgets-compare-error/5274/3 "2023-08-10T09:08:03Z")

</div>

Solved by uninstalling suggested version of itkwidgets and simply running “pip install itkwidgets”
