設置 ubuntu 默認的 python interpreter

 

要設置 ubuntu 默認的  python interpreter 以前都是直接透過連結去改, ubuntu 可透過下列指令去調整及查看.

# update-alternatives --install /usr/bin/python python /usr/local/bin/python3.6 100
# update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip3 100
# update-alternatives --display python
python - auto mode
link best version is /usr/local/bin/python3.6
link currently points to /usr/local/bin/python3.6
link python is /usr/bin/python
/usr/local/bin/python3.6 - priority 100
#

2018-09-11_9-39-54-update-alternative-python

Author: jerryw1974

learning and focus on computer science, cloud infrastructure, virtualization and information security, technical, networking,platform system and cyber-security related topic.