# How to update Slicer's Python version from 3.6.7 to 3.7?

**URL:** https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409
**Category:** Support
**Tags:** python
**Created:** [October 28, 2021, 11:44pm UTC](https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409 "2021-10-28T23:44:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![andieku](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andieku/32/8934_2.png) [@andieku](https://discourse.slicer.org/u/andieku)
#### Post date: [October 28, 2021, 11:44pm UTC](https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409/1 "2021-10-28T23:44:40Z")

</div>

Hi, is there a way to upgrade my Slicer’s (v. 4.11) Python version from 3.6.7 to 3.7 (or newer) without updating the slicer itself? I would like to use skimage’s [`skimage.segmentation.expand_labels()`](https://scikit-image.org/docs/0.18.x/api/skimage.segmentation.html#expand-labels) function and it requires Python version 3.7 or higher. Thank you!

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [October 29, 2021, 12:39am UTC](https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409/2 "2021-10-29T00:39:31Z")

</div>

Updating the Python version is something we’ve been tracking for awhile now at [Update Python version from 3.6.7 to 3.10 · Issue #5014 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/5014). Since some python packages are already dropping support for Python 3.7, plans are to upgrade to one of the most recent versions Python.

@jcfr Do you or others at Kitware have this scheduled for work soon? I assume it will be completed as part of [Update VTK9 to the latest master · Issue #5956 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/5956).

---

<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: [October 29, 2021, 2:36am UTC](https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409/3 "2021-10-29T02:36:51Z")

</div>

We’ll update Slicer’s Python, but if your main motivation is to use skimage then you don’t need to wait for that update. skimage is OK for really basic stuff, but you need much more if you work biomedical images.

For example, this `skimage.segmentation.expand_labels` function takes a _single_ distance value in _pixels_. This is completely unusable for medical imaging, where images are most often 3D and have anisotropic spacing. If a label expansion filter only supports expansion by the same distance in all directions (which may make sense) then that distance must be specified in physical distance unit, not in pixels.

I would recommend to use SimpleITK for image processing, as it exposes most ITK features with a nice Pythonic interface. Latest version of SimpleITK is already bundled with Slicer. ITK-Python packages may work in Slicer, too (it is a different Python wrapping of ITK).

---

<div class="post-metadata">

### Author: ![andieku](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andieku/32/8934_2.png) [@andieku](https://discourse.slicer.org/u/andieku)
#### Post date: [October 29, 2021, 10:39pm UTC](https://discourse.slicer.org/t/how-to-update-slicers-python-version-from-3-6-7-to-3-7/20409/4 "2021-10-29T22:39:52Z")

</div>

Thank you @lassoan for your suggestions! I will definitely take a look at SimpleITK.
