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


#1

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.

#2

Suhas HE

Where is bashrc file


#3

tullerusken -> Suhas HE

~/.bashrc


#4

Bint Alroom

that is work with me


#5

pcf11x

Very straightforward and goal oriented. I like it!


#6

Ujjwal Bansal

Nice work !! upload more


#7

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…


#8

Alejandro Hurtado

Thanks, very good and simple


#9

Tech Guy

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


#10

Divyaansha S

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


#11

Alisha Aneja

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


#12

JJ

Thanks, it’s very helpful


#13

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


#14

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?


#15

StarBoy

thanks man


#16

Arturas-Alfredas Lapinskas

thank you, friend!


#17

John

good! this help me so much!


#18

InfiltrateThem

You are a start my man!


#19

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.