Ask Your Question

How can I get R graphics to work with the Windows binary install of Sage 8.2?

asked 2018-05-14 14:54:07 -0500

dhousman gravatar image

updated 2018-05-15 06:57:36 -0500

I installed Sage 8.2 with the Windows binary. In a Sage notebook, I executed the following commands:

data = [2, 3, 7, 8, 10, 11]
print median(data)
print r.quantile(data,.5)

This works in SageMathCell (lines 2 and 3 returning 15/2 and line 4 returning an object that includes a displayed boxplot); however, in Sage 8.2 Notebook on my Windows machine, line 4 returns [1] 2, and the command


returns a Python traceback that includes "...\SageMath-8.2.exe is not a valid Win32 application."

RuntimeError                              Traceback (most recent call last)
<ipython-input-3-5d43610b342f> in <module>()
----> 1 r.png()

/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/ in png(self, *args, **kwds)
    445         t = r.eval('capabilities("aqua")')
    446         if "TRUE" not in s+t:
--> 447             raise RuntimeError("R was not compiled with PNG support")
    449         from import EMBEDDED_MODE

RuntimeError: R was not compiled with PNG support

When I searched on various words, I kept coming upon information from about 6-8 years ago dealing with different headers in the compile phase and the presence or absence of an X11 server. Do I really need to install an X11 server, download the SageMath source, make a variety of compiler choices, and compile myself?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-05-15 02:02:18 -0500

Emmanuel Charpentier gravatar image

May I suggest to report this problem (which seems a bug, indeed) in sage-support ? This would help putting your problem to the attention od Sage developers.

Copying the traceback (cut'n paste...) to a file attached to your message may also be useful.

edit flag offensive delete link more


I have done as you suggested. Thank you!

dhousman gravatar imagedhousman ( 2018-05-15 06:40:24 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-05-14 14:54:07 -0500

Seen: 35 times

Last updated: May 15