How to update Python version from 3.67 to 3.8

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?

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.

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.

@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.

1 Like

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.

1 Like