[R] Cannot use R on Windows when installed to an external drive with a space in the path

Marc Capavanni m@rc@c@p@v@nn| @end|ng |rom goog|em@||@com
Mon Oct 22 16:57:34 CEST 2018


Hi Tomas,

You're likely right, I didn't restart, unplug/replug the hard drive, or
even close CMD, so I can give that a go. Thanks for your insight.

In any case I think I'll go with the solution of using 3.5.1 as it seems to
solve the issue, and would mean I wouldn't have to modify hard drive or
registry settings on my user's PCs.

Many thanks,
Marc

P.S. I accidentally didn't include the r-help address, I'll bring it back
in in case others might find this useful.

On Mon, 22 Oct 2018 at 15:47, Tomas Kalibera <tomas.kalibera using gmail.com>
wrote:

> Hi Marc,
>
> this seems to me that the directory where R is installed still does not
> have a short name. I don't remember the details, but maybe you have to
> reboot or something for them to be generated, windows docs should say. It
> would be good to ensure that the short name exists, e.g. using "dir /x" or
> just from inside R, checking R home. R internally uses the short name when
> possible, because it is not completely robust against space in file name.
>
> I've fixed some most obvious places in R recently (already in R 3.5), but
> maybe not all and certainly packages may break with spaces in R home
> directory name and some will definitely break. So it is unsafe to use R
> without SFN, even though it may start and many packages may work fine in
> 3.5.
>
> Best
> Tomas
>
>
> On 10/22/2018 04:40 PM, Marc Capavanni wrote:
>
> Hi Tomas,
>
> Thanks for your input. I tried to enabled those settings but the issue
> persists.
>
>     E:\Program Files (x86)\R-3.3.3\bin>fsutil 8dot3name query E:
>     The volume state is: 0 (8dot3 name creation is enabled).
>     The registry state is: 2 (Per volume setting - the default).
>
>     Based on the above settings, 8dot3 name creation is enabled on E:
>
>     E:\Program Files (x86)\R-3.3.3\bin>Rscript.exe
>     'E:\Program' is not recognized as an internal or external command,
>     operable program or batch file.
>
> However I did try the latest version of R (3.5.1 as of writing) and it
> works following the same steps in which 3.3.3 does not. I've verified this
> on a few machines and different external devices, so it seems like this has
> been remedied in the past few months.
>
> Thanks,
> Marc
>
> On Mon, 22 Oct 2018 at 14:47, Tomas Kalibera <tomas.kalibera using gmail.com>
> wrote:
>
>> Dear Marc,
>>
>> this is probably because short file names are disabled on that external
>> drive. R needs short file names to be enabled on the drive where it is
>> installed - please check/follow according to Microsoft documentation on
>> turning on Short File Names (SFN, aka 8.3 names, 8dot3 names).
>>
>> Best,
>> Tomas
>>
>> On 10/22/2018 03:34 PM, Marc Capavanni via R-help wrote:
>> > Hi all,
>> >
>> > This is my second time posting this, I accidentally sent the first email
>> > without the proper subject header. Hopefully this won't create any noise
>> > and a moderator can dismiss the first one.
>> >
>> > I'm considering filing this as a bug report but wanted to make sure
>> first
>> > that I'm not doing something wrong.
>> >
>> > A piece of software which I develop installs R as part of its
>> dependencies.
>> > This normally works perfectly fine. However we noticed a bug when
>> > installing to external drives on a path that includes a space,
>> RScript.exe
>> > and R.exe will not work.
>> >
>> > E:\Program Files (x86)\R-3-3-3\bin>Rscript.exe
>> > 'E:\Program' is not recognized as an internal or external command,
>> > operable program or batch file.
>> >
>> > As you can see I'm in the directory itself, and simply calling the
>> > executable without entering a path.
>> >
>> > Similarly, if I do enter the full path with quote marks, I get the same
>> > issue.
>> >
>> > E:\>"E:\Program Files (x86)\R-3-3-3\bin\Rscript.exe"
>> > 'E:\Program' is not recognized as an internal or external command,
>> > operable program or batch file.
>> >
>> > At this stage I'm thinking it's either an R bug or a Windows bug, but I
>> can
>> > run the following just fine.
>> >
>> > E:\Program Files (x86)\HelloWorldProj\bin>HelloWorldProj.exe
>> > Hello, world!
>> >
>> > I've tested this with two variables.
>> >
>> >   A - Using the R installer OR Simply copying the binaries
>> >   B - Writing to E:\R-3-3-3 OR Writing to E:\Program Files (x86)\R-3-3-3
>> >
>> > A does not affect the outcome in any way, however R only works when B
>> uses
>> > the path without spaces.
>> >
>> > I searched elsewhere on the internet for the same and interestingly it
>> was
>> > another R install with this issue. I believe the commenters here were
>> > erroneously attributing it to the user.
>> >
>> >
>> https://stackoverflow.com/questions/43510438/how-to-run-an-executable-that-contains-a-space-in-path-from-command-line-on-wind
>> >
>> > Any thoughts? I'm open to a sensible workaround, and if it is a bug I'm
>> > happy to raise it.
>> >
>> > Thanks,
>> > Marc
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>>
>>
>

	[[alternative HTML version deleted]]




More information about the R-help mailing list