How to change from default to alternative Python version on Debian Linux - LinuxConfig.org

Your Debian Linux installation may include multiple python versions and thus also include multiple python binary executables. You can run the following ls command to find out what python binary executables are available on your system:


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux

NOTE: SOME OF THE POSTS BELOW ARE TRANSFERRED FROM LINUXCONFIG DISQUS COMMENTS.

Suhas HE

Where is bashrc file

tullerusken -> Suhas HE

~/.bashrc

Bint Alroom

that is work with me

pcf11x

Very straightforward and goal oriented. I like it!

Ujjwal Bansal

Nice work !! upload more

Etem

Thanks for the tip, but this operation causes a problem about “yum”.

“yum” command doesn’t working after switching python2.7 to python3.6.

OS: CentOS 7.

best regards…

Alejandro Hurtado

Thanks, very good and simple

Tech Guy

Thanks a lot buddy…This helped me after a great hustle.

Divyaansha S

Thank you. Helped me a lot!! :slight_smile:

Alisha Aneja

Ah! Finally! This helped me so much!!! Thanks :slight_smile:

JJ

Thanks, it’s very helpful

fireskyer

Hello

Thanks for the tip

But i get an error when i switch python and try to restart an certain program:

Error:
TabError: inconsistent use of tabs and spaces in indentation

If i get back on the old python … everything works as expected.

best regards john

Ricardo Pietrobon

thanks, very helpful. question: i’m trying to back up all of my current update-alternatives. i understand that it sets a bunch of symbolic links, but is there a single file storing all of my choices? my goal would be to use that file on a clean install so that I didn’t have to re-configure them all. or would the best alternative would be to simply create a script with all of my update-alternatives and run it during my new install?

StarBoy

thanks man

Arturas-Alfredas Lapinskas

thank you, friend!

John

good! this help me so much!

InfiltrateThem

You are a start my man!

Boyong Lambert

Thank you very much for sharing. I just started with Debian Jessie and this article is very useful to me. once again thanks.

hey Following above steps will stop yum to work as expected.