Rstudio does not install required build tools when I try to initiate a packrat r project.

1,923 views
Skip to first unread message

Yimeng Yin

unread,
May 24, 2016, 7:56:40 PM5/24/16
to packrat-discuss
Hi,

When I checked the "Use packrat with this project" box in project options, the following message popped up: 

"Managing packages with Packrat requires installation of additional build tools. Do you want to install the additional tools now?"

But nothing happened after I click "yes" and the packrat was not applied to the project. 

Then I tried to initiate packrat manually from the console using packrate::init(). Things went well until it tried to install a custom package from source (the package is downloaded from github). A message showed up saying it requires installation of additional build tools to install packages from source, but nothing was installed after I clicked "yes" and the initialization ended with an error like this: "Error in hash(descFile) : No DESCRIPTION file at path....".

Moreover, the "Use packrat with this project" box is not shown when creating a new r project. 


Any idea about what went wrong here? Thanks!

R version: 3.3.0
Rtools version: 3.3
RStudio version: 0.99.902
devtools version: 1.11.1
packrat verion: 0.4.7-1



Yimeng 

Kevin Ushey

unread,
May 25, 2016, 2:13:20 PM5/25/16
to Yimeng Yin, packrat-discuss
Hi Yimeng,

Where is your Rtools installation located? Perhaps RStudio is not able to locate it for some reason?

Things work fine for me with RStudio v0.99.902 + Rtools 3.3 installed at 'C:/Rtools'. You might also want to ensure that your Rtools binary directory (e.g. C:\Rtools\bin, for the default installation) is on the PATH.

When you installed Rtools, did you allow it to update your system registry? RStudio uses that information when attempting to scan for Rtools. E.g. you should have seen a checkbox:

   [x] Save version information to registry

when installing Rtools; by default this should be checked (and it's best to leave it checked so that RStudio can easily discover Rtools)

Thanks,
Kevin 

--
You received this message because you are subscribed to the Google Groups "packrat-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packrat-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yimeng Yin

unread,
May 27, 2016, 10:40:12 AM5/27/16
to packrat-discuss, marsh...@gmail.com
Thank you very much Kevin. 

I reinstalled Rtools and packrat now works properly with RStudio. 

I am still not sure what caused the problem because I uninstalled/reinstalled Rtools a couple of time before I posted my question and I used exactly the same path as you do, but it did not work.

Anyway, everything works ok after the latest reinstallation.

Thanks lot!

Yimeng 

Kenny Bell

unread,
Aug 12, 2016, 1:11:58 AM8/12/16
to packrat-discuss
Hi Kevin,

I have the same problem. I installed Rtools using the RStudio dialog that comes up and it gave me no options. 

I have C:/Rtools/bin in my PATH (and the files are there).

Any idea what else might be wrong? I will try restarting Windows after sending this post. But, it seems that the Rtools install workflow that's controlled by Rstudio doesn't quite work on Windows.

Kenny 

R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RevoUtilsMath_3.2.5

loaded via a namespace (and not attached):
[1] tools_3.3.0

Kenny Bell

unread,
Aug 12, 2016, 1:16:49 AM8/12/16
to packrat-discuss
I have restarted Windows, and now it works. Maybe you need a "You must restart for installation to take effect" dialog at the end of the Rtools install.

Kenny Bell

unread,
Aug 27, 2016, 11:58:40 PM8/27/16
to packrat-discuss
Back again.

I got this problem again and solved it by changing the "\" in my path for Rtools/bin to "/".

Kevin Ushey

unread,
Aug 29, 2016, 1:03:45 PM8/29/16
to Kenny Bell, packrat-discuss
That's very interesting to know; thanks! "\" is definitely the preferred separator for system paths on Windows (especially within the PATH environment variable), even though R tries to enforce the use of "/" within R scripts and so on. I'll make a note of this and see if packrat / the RStudio IDE is making any assumptions re: the path separator here.

Thanks,
Kevin

--
You received this message because you are subscribed to the Google Groups "packrat-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packrat-discuss+unsubscribe@googlegroups.com.

Stéphane Laurent

unread,
Dec 6, 2016, 8:20:01 AM12/6/16
to packrat-discuss, kmbe...@gmail.com
Same problem... When I start RStudio, I can't use packrat (I get the window "Additional tools required...")

But once I type

devtools:find_rtools()

then I can use packrat.
Reply all
Reply to author
Forward
0 new messages