Last active
September 3, 2021 14:19
-
-
Save SimonLeeGit/3a896b8737d78f734b0e1d7fd47a51ce to your computer and use it in GitHub Desktop.
How to config different python version and switch them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 切换python的版本 | |
sudo update-alternatives --config python | |
# 配置使用的python各个版本的链接 | |
# python2 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.4 5 | |
# python3 | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 5 | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment