Install 2 python versions linux

Viewed 27

So one of our servers has v2.6 installed. I’ve checked and most of the scripts that runs in this server are unix scripts. There are few python scripts but I’m not sure if it’s still being used. They are not in cron. I don’t know their users as well.

Now I want to install another version which is v3.10. In short there will be two versions in the server — v2.6 and 3.10.

My question is — is there a chance that those scripts running in v2.6 will encounter any issues once we install v3.10?

1 Answers

If these scripts explicitly point to your python 2.x interpreter (with a shebang), then no, you won't have any issues.

However, if your question is : 'will my scripts written for python 2.x run without issue within python 3.10', then the answer is it depends.

Some python2 will run perfectly fine with python3.

Note that even if you install python3.10 on let's say Ubuntu, then python will still refer to your python2 installation by default.

Related