Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R Notebook does not connect to R kernel after initial install on 64 bit Windows 7 #177

Closed
ActionPace opened this issue Aug 13, 2015 · 15 comments

Comments

@ActionPace
Copy link

I have a fresh install of R 64bit and Anaconda on Windows 7 64bit

I ran the instructions to install Jupyter for R (typed in the R Console)

install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
                 repos = c('http://irkernel.github.io/', getOption('repos')))
IRkernel::installspec()

Now when I try to create an R notebook, I see the R option in the Jupyter dropdown list but I see an error when it tries to connect to the R kernel

Here is the output when I try to connect to qtconsole (same error):

C:\Users\David>jupyter qtconsole --kernel=ir
'jupyter' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\David>ipython qtconsole --kernel=ir
Traceback (most recent call last):
  File "C:\Anaconda\Scripts\ipython-script.py", line 5, in <module>
    sys.exit(start_ipython())
  File "C:\Anaconda\lib\site-packages\IPython\__init__.py", line 120, in start_i
python
    return launch_new_instance(argv=argv, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 573,
in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, i
n catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 321, in i
nitialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, i
n catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\core\application.py", line 369, in
 initialize
    self.parse_command_line(argv)
  File "C:\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 316, in p
arse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, i
n catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 471,
in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, i
n catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 409,
in initialize_subcommand
    self.subapp.initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Anaconda\lib\site-packages\IPython\config\application.py", line 75, i
n catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\qt\console\qtconsoleapp.py", line
359, in initialize
    IPythonConsoleApp.initialize(self,argv)
  File "C:\Anaconda\lib\site-packages\IPython\consoleapp.py", line 342, in initi
alize
    self.init_kernel_manager()
  File "C:\Anaconda\lib\site-packages\IPython\consoleapp.py", line 298, in init_
kernel_manager
    self.kernel_manager.start_kernel(**kwargs)
  File "C:\Anaconda\lib\site-packages\IPython\kernel\manager.py", line 240, in s
tart_kernel
    **kw)
  File "C:\Anaconda\lib\site-packages\IPython\kernel\manager.py", line 189, in _
launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "C:\Anaconda\lib\site-packages\IPython\kernel\launcher.py", line 202, in
launch_kernel
    proc = Popen(cmd, **kwargs)
  File "C:\Anaconda\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "C:\Anaconda\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

Please advise, Thanks

@takluyver
Copy link
Member

That sounds like R is not on PATH. Can you try with master? Clone this repo, run R CMD INSTALL IRkernel, and then run IRkernel::installspec() inside R again.

@ActionPace
Copy link
Author

Thanks.. I added the location of the R executables on the windows PATH variable and it worked.. I didn't understand the other instructions.

@takluyver
Copy link
Member

OK, glad that worked. We've made a change to IRkernel so you shouldn't need that, and we need someone to test it on Windows - I was hoping you could lend a hand with that.

@ActionPace
Copy link
Author

OK, so what do I do? Remove R from the PATH, reinstall R and start from scratch?

@takluyver
Copy link
Member

No need to reinstall R. If you have, or can install, the R package 'devtools', grab that and do:

library(devtools)
install_github('IRkernel/IRkernel')

If not, download this and unzip it, then use a command prompt to run R CMD INSTALL IRkernel (IRkernel being the folder from the zip file).

Either way, then run IRkernel::installspec() again. This should put the new kernelspec on your system. Then try creating an R notebook and see if it works.

Thanks!

@takluyver
Copy link
Member

@flying-sheep @JanSchulz I'd like to get a new release out with this fix in. Is there anything else you want to land soon, or should we go for 0.5?

@flying-sheep
Copy link
Member

not really, but #153 would be a low-hanging fruit bugfix.

@takluyver
Copy link
Member

Fancy doing a PR? ;-)

@EarlGlynn
Copy link

FWIW, the fix above helped me tonight, so it is needed.

@flying-sheep
Copy link
Member

i directly commited 13ed0d7, it was trivial enough.

quit() is seemingly a bigger undertaking, so let’s not wait for that one and go with 0.5 instead

@takluyver
Copy link
Member

Thanks @flying-sheep

I've bumped the version number and tagged 0.5. @JanSchulz @asmeurer, please work your packaging magic whenever it's convenient. :-)

@jankatins
Copy link
Contributor

I submitted a PR in irkernel.github.io for both the source and the windows binaries

@asmeurer
Copy link

asmeurer commented Oct 5, 2015

@groutr and @ilanschnell are the people to bug about this now.

@flying-sheep
Copy link
Member

this is fixed right?

@takluyver
Copy link
Member

I believe so, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants