-
Notifications
You must be signed in to change notification settings - Fork 291
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
Dead kernel when running any R code, PNG and X11 related #388
Comments
if you have the PNG capability and your PNG device doesn’t work, that’s an R bug or a problem with your setup.
this also sounds strongly like there’s something wrong with your installation. you can circumvent it by installing the |
Thanks for the reply. The Cairo PNG device is working in my installation:
Creates the expected output. I have no X11 device because I'm running on a headless server - this is reflected in R capabilities() showing X11 as FALSE. Is there a reason why IRkernel attempts to use png() with X11 when my capabilities() say X11 is not available? Is this expected behaviour? Is there a way for me to tell IRkernel to use Cairo and not X11? Secondly, I'm not sure why a graphics device is required to execute code:
I have not used Jupyter before so maybe the answer is blindingly obvious, and if so I do apologise - I'm just trying to set up multi-user Jupyter on a compute server that is used by my team, with R support being vital to this setup. EDIT: I guess these questions might pertain to Jupyter and not IRkernel? Sorry I'm not sure which responsibilities belong where at the moment. |
hmm, so there’s two places where devices are used:
since you have a broken installation that doesn’t allow you to use
this is a bit complicated and nonobvious, but look: we have changed the dummy device so often and discussed and debugged stuff so many times that i really don’t want to touch it. see: many weird setups and broken/unusual installations wanted to work with us and every change broke something else until we settled on our current dummy device. i’m sorry that it doesn’t work for you, but it’s complex enough as is. i think expecting |
Thank you very much for taking the time to explain the things I was missing, and for linking to the relevant code! I understand now the expectation for the png() device, thanks. It's fine to have these requirements, it just really was non-obvious to me - and maybe others, I hope this ticket helps them too. I will definitely try the Cairo package (not capability =) as that will be simpler than maintaining something like an "xvfb" virtual X11 device on the machine, and less messy than overriding the dummy device in R - but nice to have that option as a back up too. Many thanks! |
no problem! 😄 but you seem to have missed a detail: if alternatively, you can make |
You're right about still needing png() to work - I resolved my issue by setting ~/.Rprofile for "root" (Jupyterhub process user) as follows:
Cheers! |
wonderful, didn’t know that can be done. and as a side effect, your R environment got saner 😄 |
I was stuck on this same issue for hours. I tried multiple installs/reinstalls of conda r-essentials and updated zeromq, pcre, etc. Kernel still kept dying every time I enter library(dplyr). The notebook console showed the following: Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : I was running jupyter notebook server headless remotely via a nohup comand. When I ran the same command via VNC on the VM itself, it seems to have resolved the issue at least for me. This issue has indeed been a pain. |
yeah exactly: you have R compiled to use it won’t work until you either
|
another workaround...
|
I'm also hitting this--running from Crouton and a conda MRO installation--and the solutions suggested here haven't worked (or I'm not doing them right):
Some relevant pieces of my
|
Hi @MaxGhenis, In that snippet, simply substitute the R binary path with the one that lives in your Conda environment and it should work. If you don't know what that path is, activate your Conda env on the shell and do: The |
I tried both |
well, i don’t know what epirecipes is and I can’t help without any kind of information. if you have the regular R with X11 support and so on, it’ll work. If you have something weird as mentioned above, one of the workarounds above helps. If you have something else, I need
|
@MaxGhenis - it looks like you're mixing mro and non-mro packages so you might be also/instead running into ContinuumIO/anaconda-issues#9679 You probably want to install the mro version:
|
@dhirschfeld what channel would this be on?
|
|
Not sure I follow. That was the error message resulting from the command you suggested:
|
The error message has |
I didn't:
|
What conda are you running? Does it work without the |
I'm on 4.5.8 (up-to-date). Same error without |
Sorry @MaxGhenis for the run around - it's a typo on my part:
...the version should be |
Still getting the error replacing
|
Might be because I'm on I thought the build strings would be the same, but maybe that's not the case. The version you want is the one with |
That worked to install |
It looks like you're still running into the png issue. I'm out of my depth on the png issue but I'd be inclined to try patching your |
Replacing that comment's I wonder if the crouton error message when starting |
@MaxGhenis Wonder if you you were able to fix it at all |
No I wasn't. |
Sorry for being of no help here, but you have to point the kernel JSON to a version that has png support. |
I finally got too frustrated with conda due to lots of clashes, and my need to have a single environment where everything works. I ended up just installing R from a PPA:
|
…or headless nodes, since otherwise, without X11, you run into IRkernel/IRkernel#388
See the topmost pinned issue: https://github.com/IRkernel/IRkernel/issues |
Hi,
I'm not sure this is a bug but maybe just some clarification or a workaround required.
Seems related to Issue #386
When attempting to execute any R code (not even graphics related, just something like "
a <- 1
" will do it), the kernel dies.Error output:
My R capabilities:
I'm running on a headless Centos 6.7 server. R was configured with X11 support but capabilities() says it's FALSE because a graphics device is not found.
However I have both PNG and Cairo support enabled, I'm wondering if "Cairo" is supposed to be preferenced over PNG?
I installed IRkernel from Github yesterday July 31st.
If this isn't a bug, my intention is to run an "xvfb" server to enable an X11 graphics device and see if that resolves the issue but I'd rather try to make it work without resorting to that.
Any help/info appreciated.
The text was updated successfully, but these errors were encountered: