How to know which is running in Jupyter notebook?

Victor picture Victor · Nov 19, 2016 · Viewed 152.2k times · Source

I use Jupyter notebook in a browser for Python programming, I have installed Anaconda (Python 3.5). But I'm quite sure that Jupyter in running my python commands with the native python interpreter and not with anaconda. How can I change it and use Anaconda as interpreter?

Ubuntu 16.10 -- Anaconda3

Answer

Davies Odu picture Davies Odu · Sep 17, 2018
from platform import python_version

print(python_version())

This will give you the exact version of python running your script. eg output:

3.6.5