In the Linux system, you can use alias
the command to python3
change the command to python
. Enter the following command in the terminal:
alias python='python3'
This way, when you enter a command in the terminal later python
, it is actually running python3
the command. If you want to take effect permanently, you can add this command to the ~/.bashrc
or ~/.bash_aliases
file.