1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
//old python version >which python /usr/bin/python //old python version >which python2.7 /usr/bin/python2.7 //new python version >which python3.5 /usr/local/bin/python3.5 sudo ln -sf /usr/local/bin/python3.5 /usr/bin/python This will make a symbolic link from /usr/bin/python --> /usr/local/bin/python3.5 (replacing the old hardlink). >python -V Python 3.5.9 //if you want to remove the shortlink >rm /usr/bin/python rm: remove symbolic link '/usr/bin/python'? >y //recover old version to default sudo ln -sf /usr/bin/python2.7 /usr/bin/python |