+2 votes

1 Answer

+1 vote
by (user.guest)
 
Best answer

By default, the linux terminal uses the python alias to refer to the python v2. To change this default configuration to python v3, you need to edit the aliases file. You can find this in the home directory. If it's not present, or if you're unsure of how to locate it, run the command below in your terminal.

cd ~

gedit .bash_aliases

This will open up the bash aliases file. Add the line below to the file and save.

alias python = python3

Close and open terminal again. Running the python --version command should display the python3 version information this time.


Please leave a comment below if you found this answer helpful. Happy coding!

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

Chuck Norris does not code in cycles, he codes in strikes.
...