CLI Issue: "Lightning is running from outside your current environment"t

Every time I use lightning cli I have receive the warning below:

user $ lightning
  warnings.warn(
INFO: Lightning is running from outside your current environment. Switching to your current environment.
The lightning package is not installed. Would you like to install it? [Y/n (exit)]: Y
INFO: ⚡ RUN: pip install lightning
/usr/bin/python2.7: No module named pip
We encountered an unexpected problem while checking your environment.We will still proceed with the command, however, there is a chance that errors may occur.

Is there a way to correctly install the lightning package such that this warning disappears?
Thanks

You can see that it is running wtih python 2.7 from your output:
/usr/bin/python2.7

if you run
which python

you will probably see it pointing to python 2.7 on your system.

The safest way is to use a virtual environment to isolate your system’s python, and then use Python 3. For example:
https://lightning.ai/docs/pytorch/stable/starter/installation.html#install-with-conda

Then inside the virutal environment, you can install lightning as normal.