Modify Python 3 to default Python under Linux

Delete the old Python connection first.

sudo rm -rf /usr/bin/python

2. After deletion, establish a new connection relationship. For example, in Linux, Python 3 defaults to/usr/local/bin/, so:

ln -s /usr/local/bin/python3  /usr/bin/python

Change/usr/local/bin/python3 to your own path.

3. View the current Python path being used.

which python

View all Python paths, not just one.

whereis python