# How to update Python version from 3.67 to 3.8

**URL:** https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650
**Category:** Support
**Tags:** python
**Created:** [March 19, 2021, 6:25pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650 "2021-03-19T18:25:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![full\_stack\_master](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/full_stack_master/32/9693_2.png) [@full\_stack\_master](https://discourse.slicer.org/u/full_stack_master)
#### Post date: [March 19, 2021, 6:25pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650/1 "2021-03-19T18:25:30Z")

</div>

I want to update My slicer’s Python version from 3.6.7 to 3.8 because I am going to use Torch package  
As you know, this package is working on Python 3.8  
Can you help me?

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [March 19, 2021, 6:30pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650/2 "2021-03-19T18:30:52Z")

</div>

To answer your question it’s not easy to change python versions. We update fairly frequently but it’s not always easy (perhaps these minor versions would be, I don’t know).

But if your goal is to use torch, I was able to pip\_install torch with recent Slicer versions and it worked great.

---

<div class="post-metadata">

### Author: ![fbordignon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fbordignon/32/5269_2.png) [@fbordignon](https://discourse.slicer.org/u/fbordignon)
#### Post date: [October 29, 2021, 2:45pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650/3 "2021-10-29T14:45:25Z")

</div>

Hey @pieper, I am willing to give this a go (upgrade to 3.8). Do you remember the sort of problems I may face when doing so? There are a few libs that could benefit from the upgrade.  
Thanks!

---

<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, 3:53pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650/4 "2021-10-29T15:53:03Z")

</div>

@jcfr recommended at least Python-3.9 and maybe Python-3.10.

You can try updating `python-source` in Slicer’s External\_python.cmake to 3.10 and report any errors you get and cannot fix by yourself to the [python-cmake-buildsystem project](https://github.com/python-cmake-buildsystem/python-cmake-buildsystem).

---

<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, 3:55pm UTC](https://discourse.slicer.org/t/how-to-update-python-version-from-3-67-to-3-8/16650/5 "2021-10-29T15:55:45Z")

</div>

Already started work on the python-cmake-buildsystem project is detailed in this Slicer issue. There is indeed changes needed on the python-cmake-buildsystem front to support the upgrade.

> <https://github.com/Slicer/Slicer/issues/5014>
>
> This was initially discussed in https://github.com/Slicer/Slicer/issues/4859
> 
> …The following PR would need to be finalized:
> 
> \- \[\] python-cmake-buildsystem/python-cmake-buildsystem#264
> \- \[\] python-cmake-buildsystem/python-cmake-buildsystem#267
> \- \[\] When Slicer's Python is upgraded then post a comment to MONAILabel issue https://github.com/Project-MONAI/MONAILabel/pull/378 (so that they can remove Python-3.6 support from MONAILabel)
