A bit of background
Python2 and 3 are in many ways separate languages. For configuration and use definitely consider them as separate. The code you read and write is very similar though.
Python 2 is not supported (by python.org) from 1/1/20. That is no bug fixes etc. So you should not be using it.
Due to the difference you need separate pip versions. The standard macOS way is pip and python are links to the Python 2 versions. python3 and pip3 are the links to the Python 3 versions.
As usual with software supplied with macOS you do not upgrade Apple versions of software. However you can install other versions as well as the Apple versions. In fact the normal advice from python users is not to use Apple's versions but use another one.
The alternatives are install via a general package manager e.g. MacPorts, HomeBrew, Fink or from python bases managers python.org or I use Conda especially if you use numpy etc. (it does have a version of tensorflow). python now comes with pyvenv and other tools to allow you to chose which version to use for a particular project, conda has a similar way of doing this, macports has a simple link allowing choice of one version or another globally and not by project.
There is no absolute way of seeing what uses python 2. However a reasonable guess is to look at the first line of each python file for the hash bang invocation. This tends to be
#!/usr/bin/env python for scripts that use python 2 - scripts using python3 will have 3 in the line.
Again no consistent way.
However the Apple recommendation is for apps that use an interpreter or runtime is to embed the interpreter into the app bundle - thus it is up to the application supplier to deal with python versions etc and the user does not need to and probably should not alter how the app is run.