ubuntu@ubuntu:~/work/tool/Python-3.8.8$ python --version
Python 2.7.12
顯示的是ubuntu自帶版本
ubuntu@ubuntu:~/work/tool/Python-3.8.8$ python3 --version
Python 3.8.8
要改一下
ubuntu@ubuntu:~/work/tool$ which python3
/usr/local/bin/python3
ubuntu@ubuntu:~/work/tool$ update-alternatives --list python
update-alternatives: error: no alternatives for python
#說明沒有配這個(gè)python
ubuntu@ubuntu:~/work/tool$ sudo update-alternatives --install /usr/bin/python python /usr/local/bin/p
pip3 ?????????????pydoc3 ???????????python3 ??????????python3.8-config
pip3.8 ???????????pydoc3.8 ?????????python3.8 ????????python3-config
ubuntu@ubuntu:~/work/tool$ sudo update-alternatives --install /usr/bin/python python /usr/local/bin/python3.8 1
update-alternatives: using /usr/local/bin/python3.8 to provide /usr/bin/python (python) in auto mode
ubuntu@ubuntu:~/work/tool$ python --version
Python 3.8.8
給自己留點(diǎn)腳印防止以后參考網(wǎng)站掛掉,附參考網(wǎng)址
https://blog.csdn.net/jc15988821760/article/details/95166733