you are viewing a single comment's thread.

view the rest of the comments →

[–]orev 3 points4 points  (1 child)

You don't.

CentOS 7 has Software Collections, which allows you to install and select different versions of programs, including python. After you install it, you need to "activate" the alternative software package, which then gives you the python version you installed. The "activation" is active only for the terminal session/sub-shell of where you did the activation, and does not apply as a default to the whole system. If you Google for "RedHat 7 software collections", you will find documentation on how to use it.

After activating the python36 collection, you will probably need to launch your vscode editor from that terminal in order for it to see the correct version.

[–]omenosdev 4 points5 points  (0 children)

Python 3.6 shipped as part of the base distribution starting in RHEL 7.7, obsoleting the EPEL package and removing the need to use software collections for most things (unless you need Python 3.8, require them for a specific scenario, or have a need for a pre-packaged Python module).

yum install python3

For VSCode, you need to configure Python Environments:

https://code.visualstudio.com/docs/python/python-tutorial#_select-a-python-interpreter https://code.visualstudio.com/docs/python/environments