快捷查询ubuntu软件版本,python2切换成python3
快捷查询ubuntu软件版本
python -V
Python 2.7.17
python3 -V
Python 3.6.9
nvcc -V
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_21:14:42_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
pkg-config --modversion opencv
3.4.3
python2切换成python3
方法一:
sudo update-alternatives --config python
方法二:
设置优先级,数字越大越优先,将python3设置成150,优先级就提高了
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
查看当前版本:
python --version