positron icon indicating copy to clipboard operation
positron copied to clipboard

Allow Positron to be installed without admin rights on Windows

Open olivroy opened this issue 1 year ago • 6 comments

VScode is installable without admin rights. Is it possible that Positron does the same? (on June 27, it didn't)

olivroy avatar Jun 28 '24 15:06 olivroy

We should be able to add this, thanks for logging the ask!

petetronic avatar Jun 28 '24 18:06 petetronic

Any update on this? Just wondering (I know it was barely asked so no worries) because I'm getting an error when trying to install packages and I'm thinking it might be related. Screenshot 2024-07-01 161206

averyrobbins avatar Jul 01 '24 23:07 averyrobbins

@averyrobbins I suspect your problem may be different? On my Windows VM, the library paths are:

.libPaths()
#> [1] "D:/Users/jenny/AppData/Local/R/win-library/4.3"
#> [2] "C:/Program Files/R/R-4.3.3/library"

Created on 2024-07-01 with reprex v2.1.0

Note that the first place a new package will be installed is in my user library. And I feel like this (including the creation of this library) is the default behaviour on Windows. So I would try to figure out why you don't have a user library. (And then, yes, it does seem like you don't have permission to write to the system library, but I suppose that is expected for you.)

jennybc avatar Jul 01 '24 23:07 jennybc

Thank you for your response, @jennybc. You were right, a different issue. I'm currently using Windows 11, where it seems like R wanted to be installed in "C:/Program Files..." I reinstalled it in "C:/Users/username..." where I have write permissions and that solved the problem. Excited to try Positron (great name btw). Thanks.

averyrobbins avatar Jul 02 '24 00:07 averyrobbins

I'm glad you are unstuck. For others who come by:

... it seems like R wanted to be installed in "C:/Program Files..."

yes, that is the usual place for R installation on Windows and will "just work" for lots of people. But it sounds like your machine is locked down in such a way that you need to depart from the default.

jennybc avatar Jul 02 '24 02:07 jennybc

@petetronic can we address some of the problems raised in https://github.com/posit-dev/positron/discussions/3874 with changes to our Windows build as well?

juliasilge avatar Jul 05 '24 19:07 juliasilge

I also second this! Specially with the daily releases you have… I don't have a problem to install it on my Mac with homebrew and usually I get updates every day or two days, but on my corporate computer I don't have admin rights and I need to ask if I want to update, which is a a little bit a pain in the…

luispuerto avatar Jul 10 '24 09:07 luispuerto

We're just testing a "user" level windows installer today and will push for download to Positron this week.

petetronic avatar Aug 05 '24 19:08 petetronic

Verified Fixed

Positron Version(s) : 2024.07.0-134 OS Version(s) : Windows 11

Test scenario(s)

New user package correctly installs on a standard user (non-admin) account without needing UAC elevation.

As noted above, a package will be released this week.

Link(s) to TestRail test cases run or created:

n/a

jonvanausdeln avatar Aug 06 '24 15:08 jonvanausdeln

2024.08.0-5 is now available and contains a new "User" installer for windows that doesn't require elevation.

jonvanausdeln avatar Aug 06 '24 18:08 jonvanausdeln

I just tested this. I could install it, but Positron doesn't find my R installation (only Python) Is there a setting to specify the path to the R installation? (RStudio does work)

olivroy avatar Aug 06 '24 18:08 olivroy

@olivroy, Can we get a little more information about your R installation? E.g. location, how it was installed. Positron checks the registry, PATH, and a few default locations. (See #3702)

jonvanausdeln avatar Aug 06 '24 18:08 jonvanausdeln

My R is in C:\Program Files\R. It doesn't seem to be in the PATH (because it was installed by the IT) I have 4.3.2 I don't think I can manually edit the PATH (due to the lack of admin rights) I have 4.3.2

It is in C:\Program Files\R\R-4.3.2\bin\R.exe and C:\Program Files\R\R-4.3.2\bin\x64\R.exe.

RStudio seems to be using the first one.

olivroy avatar Aug 06 '24 18:08 olivroy

@olivroy , thank you for the information! I think we should track this in a new issue, would you be able to open a new issue and include your setup, etc? It would also be helpful include what you see at in the "Positron R Extension" in the "Output" tab.
See our wiki page for details.

Example: image

jonvanausdeln avatar Aug 06 '24 19:08 jonvanausdeln

Actually, I have been able to fix it by manually adding my R installation to the PATH via Modify Environment Variables for your account! Appending the R PATH to the Path variable here seems to have done the trick! https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

olivroy avatar Aug 06 '24 19:08 olivroy

I would have expected your installation to be discovered primarily from its totally normal location:

C:\Program Files\R

so I wouldn't expect it to be necessary to put it on the PATH. (But of course I'm glad that's working, it's fresh from the oven!)

If you'd like to pursue this, open an new issue or question and share the R discovery bits from the Positron R Extension output channel.

jennybc avatar Aug 06 '24 19:08 jennybc

I've tested it. Neither standard or User Setup installer from 2024.08.0-5 works on my machine. Same error on both: image 2024.07.0-12 works normally.

b-trochimowicz avatar Aug 07 '24 07:08 b-trochimowicz

@b-trochimowicz can you open a new issue or discussion outlining the problem you are observing?

juliasilge avatar Aug 07 '24 17:08 juliasilge