How to upgrade pip?

One of my notebooks gives me this warning in a new file every time I start it:

WARNING: You are using pip version 21.3.1; however, version 22.3.1 is available.
You should consider upgrading via the '/opt/python/envs/default/bin/python -m pip install --upgrade pip' command.

I have not been able to figure out how to do this. As far as I can tell, I don’t have console access. Any guidance?