When you enter a Python command on linux, it defaults to /usr/bin/python2.7. For ease of use, create a [symlink] and the python command points to python3. [Symlink]: https://en.wikipedia.org/wiki/%E3%82%BD%E3%83%95%E3%83%88%E3%83%AA%E3%83%B3%E3% 82% AF
#Show python version
$ python -V
Python 2.7
#Delete the original symbolic link
$ sudo rm -rf /usr/bin/python
#Search python related files
$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.6.5 /usr/bin/python3.8.5
#Create a symbolic link
$ sudo ln -s /usr/bin/python3.8 /usr/bin/python
#Show python version
$ python -V
Python 3.8.5
The same is true for pip ~~
Recommended Posts