I launched JupyterLab which is using a Python 3 kernel. However, when I am running the following commands below, it is showing different Python versions.
!python -V
Output: Python 2.7.18
from platform import python_version
print(python_version())
Output: '3.6.10'
I am expecting the Python 3.6.10 version to appear as it is the kernel that I launched/that is running. Is there a way to activate the Python 3 version whenever I run the "!python -V" command?
!invoke system commands? This would mean you query the system python interpreter, which does not have anything to do with the kernel that's currently running.!python3 -V, but that still does not guarantee that it's the same interpreter as in the kernel... but at least it's python3.