Modify the default Python version number of ubuntu

*******you must have root authority***

1. Delete Python under /usr/bin

sudo rm /usr/bin/python  

2. Create a new link with the following command

sudo ln -s /usr/bin/python3.5 /usr/bin/python  

3. Use the following command to restore version 2.7 (do the delete command in step 1 first)
sudo ln -s /usr/bin/python2.7 /usr/bin/python2.7bak

4. Restore Python

If you want to restore back to the original python2.7, just

sudo mv rm /usr/bin/python

sudo ln -s /usr/bin/python2.7 /usr/bin/python



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326482645&siteId=291194637