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.