0

I'm using python 3.6.8 as default. I'm trying to replace it with python 3.7 for my work. How can I do it, I have tried a few ways but they didn't work. Thanks a bunch!

karel
  • 122,292
  • 133
  • 301
  • 332

2 Answers2

1

I would not recommend to replace the default installation with a newer version.

Maybe some system tools depend on Python 3.6, and do not work on Python 3.7.

I suggest to install Python 3.7 and just use it directly via python3.7.

0

i will suggest few steps to update alternatives , first remove all alternatives config

sudo update-alternatives --remove-all python

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2

then you can choose any time which version you want to use

sudo update-alternatives --config python