0

I am trying to install R kernel into Jupyter. After following the instructions in https://irkernel.github.io/installation/, I get the following error message. I use Enthought Canopy and Python 2.7. I have R installed and working independently.

>IRkernel::installspec()
  File "/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/bin/jupyter-kernelspec", line 8
    from jupyter_client.kernelspecapp import KernelSpecApp.launch_instance
                                                          ^
SyntaxError: invalid syntax

Any ideas on how to fix this please?

Time Lord
  • 331
  • 2
  • 5
  • 12

1 Answers1

0

It seems that the code in the call to installspec was incorrect. Open the file in your folder with XCode and edit as below. Close the file. Re-run the command in the Terminal. The original file reads as:

if __name__ == '__main__':
    import sys
    from jupyter_client.kernelspecapp import KernelSpecApp.launch_instance

    sys.exit(KernelSpecApp.launch_instance())

It ought to read...

Thanks to Installing RKernel for clarification. I am reposting with a more specific heading.

Community
  • 1
  • 1
Time Lord
  • 331
  • 2
  • 5
  • 12