I have python 3.5.2, and 3.6.7 installed but i need python 3.6.2 only how can i remove other versions and only get 3.6.2 on the machine
21 Answer
Try this
sudo apt purge python2.x
sudo apt purge python3.xAs there are still a lot of packages that depend on Python2.x So you should have a close look at the packages that apt wants to remove before you let it proceed.
after that you can install your required version by
$ sudo apt update
$ sudo apt install python3.6.2then you can check by
ls -l /usr/bin/python*