Ubuntu 切换默认Python版本

将Python3设置为默认

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150

更新为python3.6

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

修改系统默认python版本为3.6,并更新

cd /user/bin
rm python
ln -s python3.6m python
python pip install --upgrade pip

如果pip安装报错

locale.Error: unsupported locale setting

执行

export LC_ALL=C  语言设置的问题