posit-dev / positron

Positron, a next-generation data science IDE
Other
2.48k stars 77 forks source link

Allow Positron to be installed without admin rights on Windows #3703

Closed olivroy closed 1 month ago

olivroy commented 3 months ago

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

petetronic commented 3 months ago

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

averyrobbins commented 3 months ago

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

jennybc commented 3 months ago

@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.)

averyrobbins commented 3 months ago

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.

jennybc commented 3 months ago

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.

juliasilge commented 2 months ago

@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?

luispuerto commented 2 months ago

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…

petetronic commented 1 month ago

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

jonvanausdeln commented 1 month ago

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 commented 1 month ago

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

olivroy commented 1 month ago

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)

jonvanausdeln commented 1 month ago

@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)

olivroy commented 1 month ago

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.

jonvanausdeln commented 1 month ago

@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

olivroy commented 1 month ago

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/

jennybc commented 1 month ago

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.

b-trochimowicz commented 1 month ago

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.

juliasilge commented 1 month ago

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