Search code examples
rportyacas

yacas on windows: cannot enable port 3794


I have read the info in R: trouble making package Ryacas to work on Windows . I installed the yacas executable and can run it directly by double-clicking the yacas.exe icon. However, if I try to get any help, e.g. "??" I get the error message "lynx is not recognized as an internal / external command..." . If I try to run from a cygwin bash session, % ./yacas.exe , the startup message is echoed to the terminal window, a popup window tells me "invalid handle", and yacas exits. And, finally, in R, Ryacas("some_command") fails with the message

"[1] "Starting Yacas!"
Error in socketConnection(host = "127.0.0.1", port = 9734, server = FALSE,  : 
  cannot open the connection
In addition: Warning message:
In socketConnection(host = "127.0.0.1", port = 9734, server = FALSE,  :
  127.0.0.1:9734 cannot be opened"

I tracked down some instructions on opening ports in Windows 7, and tried adding both inbound and outbound rules to enable port 9734, using the "Windows Firewall" manager under ControlPanels. So far as I can tell, the new rules were accepted, but R still returns that error message.
Am I setting up the Firewall rules correctly? I've tried specifying connection types "any", "TCP" and "UDP", and in addition creating rules aimed at yacas.exe (rather than port numbers). (Is it possible that the corporate admin rules are overriding my config without reporting such conflicts to me? I know relatively little about the guts of Win7 admin)

To summarize: what else can I try to get the local server/port to work? I don't know if this helps ID the problem, but standard HTML help under R does work, e.g. opens up a web page like http://127.0.0.1:24932/library/base/html/Trig.html

One more thing, in R,

yacasFile()
[1] "C:\\Program Files\\R\\R-2.15.2\\library\\Ryacas\\yacdir\\yacas.exe"

So at least R is looking in the right place.


Solution

  • This is being transferred from the comments. See advice about putting Ryacas in a personal library and not in the C:\Program Files tree in the Ryacas Windows installation section of the home page.