gusl: (Default)
[personal profile] gusl
* using the default PATH, Rscript is not accessible, even though (due to brokenness). This goes for both shells.

* I cannot set PATH inside a script, forcing me to set it by hand. (both shells)

* after setting the PATH to point only to R/bin, Rscript works on Cygwin (but 'ls' doesn't!), but not on MinGW.

* MinGW cannot run inside Emacs. But I can run SSH from MinGW.

* I can use Cygwin inside Emacs (but only if I didn't start an R process). However, I cannot run SSH.

---

UPDATE: I create a symbolic link, Rscript.lnk, and added it to C:/cygwin/bin (a.k.a. /usr/bin)
Now I can run Rscript from anywhere.

(no subject)

Date: 2010-03-16 02:53 am (UTC)
From: [identity profile] radiata-prime.livejournal.com
Are you exporting your variables?

(no subject)

Date: 2010-03-16 03:57 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
What do you mean? Cygwin and MinGW copy the environment variables from Windows (and then modify them a little bit).

um, ok, by creating a ~/.bashrc with:

export PATH=/cygdrive/c/Progra~1/R/R-2.9.0/bin

the PATH variable is changed accordingly. But the files in it are still inaccessible, and with a bizarre message:

$ Rscript
sh.exe": Rscript: command not found

(no subject)

Date: 2010-03-16 05:43 am (UTC)
From: [identity profile] stepleton.livejournal.com
That quote mark is mysterious. Could it be that your shell is starting bash in such a way that bash thinks its name is sh.exe" instead of sh.exe, and consequently it is deciding not to run .bashrc on startup? What happens if you type ". .bashrc" (no quotes) and then try to run Rscript from the shell?

(no subject)

Date: 2010-03-16 05:48 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
.bashrc is running! It has an effect on PATH.

Administrator@PC221421033610 /c
$ cd ~

Administrator@PC221421033610 ~ ((unknown))
$ . .bashrc

Administrator@PC221421033610 ~ ((unknown))


(no subject)

Date: 2010-03-16 05:52 am (UTC)
From: [identity profile] stepleton.livejournal.com
Sorry, missed that detail. Maybe you should use Program\ Files or whatever instead of Progra~1? Dunno...

Oh, one other idea. Is Rscript a script? If so, and $PATH doesn't point in the right place, then maybe "Command not found" is not saying that Rscript isn't found but that a command in the Rscript script is not found. What happens when you type "which Rscript" at the prompt?

(no subject)

Date: 2010-03-16 06:28 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
MinGW:
Administrator@PC221421033610 ~ ((unknown))
$ which Rscript
sh.exe": which: command not found


I'm not gonna try "which which"!


Cygwin:
$ which Rscript
which: no Rscript in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Progra~1/R/R-2.9.0/bin:/cygdrive/c/Progra~1/ImageMagick-6.5.5-Q16:/cygdrive/c/Progra~1/emacs/emacs-22.3/bin:/cygdrive/c/Progra~1/Graphviz2.20/bin:/cygdrive/c/Progra~1/MATLAB/R2008a/bin/win32:/cygdrive/c/Python26:/cygdrive/c/Progra~1/MATLAB/R2008a/bin:/cygdrive/c/Progra~1/HPQ/IAM/bin:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32:/cygdrive/c/Rtools/MinGW/bin:/cygdrive/c/Rtools/perl/bin:/cygdrive/c/Rtools/bin:/cygdrive/c/Progra~1/Git/bin:/cygdrive/c/Progra~1/TortoiseGit/bin)

which is wrong!

(no subject)

Date: 2010-03-16 07:14 am (UTC)
From: [identity profile] radiata-prime.livejournal.com
Hmm, if you've gotten your base installation issues resolved (e.g. ls doesn't work), you might want to verify your windows paths against cygpath

http://cygwin.com/cygwin-ug-net/using-utils.html#cygpath

no reason it has to be progra~1, i remember it being progra~4 back in the day.

(no subject)

Date: 2010-03-16 07:18 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
"Progra~1" works. I call Rscript that way.

Something like cygpath is already used to translate the Windows PATH into the PATH variable in Cygwin.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags