ShpielMeister
ShpielMeister

Reputation: 1455

Is there a way to tell which kernel a jupyter notebook was built with?

I have multiple kernels installed in Jupyter. without fully starting Jupyter in a browser I'd like to know which version of Python or Julia or R was used to create the notebook. is there a way to query the ipynb file using command line?

How to know which is running in Jupyter notebook? discusses how to change kernels. I'd like to be able just to interrogate the notebook.

Upvotes: 6

Views: 2461

Answers (1)

HarmonicaMuse
HarmonicaMuse

Reputation: 7893

As @Georgy said, you can use jq, ie.:

ismael-vc@toybox ~/Downloads % cat Untitled.ipynb | jq '.metadata.kernelspec'
{
  "display_name": "Julia 0.6.0",
  "language": "julia",
  "name": "julia-0.6"
}

Upvotes: 7

Related Questions