File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,17 @@ export class KernelManager {
2929 this . getKernelSpecForGrammar ( grammar ) . then ( kernelSpec => {
3030 if ( ! kernelSpec ) {
3131 const message = `No kernel for grammar \`${ grammar . name } \` found` ;
32- const description =
33- "Check that the language for this file is set in Atom and that you have a Jupyter kernel installed for it." ;
34- atom . notifications . addError ( message , { description } ) ;
32+ const pythonDescription =
33+ grammar && / p y t h o n / g. test ( grammar . scopeName )
34+ ? "\n\nTo detect your current Python install you will need to run:<pre>python -m pip install ipykernel\npython -m ipykernel install --user</pre>"
35+ : "" ;
36+ const description = `Check that the language for this file is set in Atom and that you have a Jupyter kernel installed for it.${
37+ pythonDescription
38+ } `;
39+ atom . notifications . addError ( message , {
40+ description,
41+ dismissable : pythonDescription !== ""
42+ } ) ;
3543 return ;
3644 }
3745
@@ -121,14 +129,10 @@ export class KernelManager {
121129
122130 if ( kernelSpecs . length === 0 ) {
123131 const message = "No Kernels Installed" ;
124- const pythonDescription =
125- grammar && / p y t h o n / g. test ( grammar . scopeName )
126- ? "\n\nTo detect your current Python install you will need to run:<pre>python -m pip install ipykernel\npython -m ipykernel install --user</pre>"
127- : "" ;
132+
128133 const options = {
129- description : `No kernels are installed on your system so you will not be able to execute code in any language.${
130- pythonDescription
131- } `,
134+ description :
135+ "No kernels are installed on your system so you will not be able to execute code in any language." ,
132136 dismissable : true ,
133137 buttons : [
134138 {
You can’t perform that action at this time.
0 commit comments