Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't switch R binary to a rig installed R version #481

Open
dkczk opened this issue Jun 14, 2024 · 0 comments
Open

Can't switch R binary to a rig installed R version #481

dkczk opened this issue Jun 14, 2024 · 0 comments

Comments

@dkczk
Copy link

dkczk commented Jun 14, 2024

I often face the issue that I have to switch between different R versions. Gladly, rig makes this easy but I also use radian for years. So I thought that I could easily combine the best of both worlds by linking radian to the currently in use version of R installed through rig. But when I do that by using radian --r-binary=/opt/R/current/lib/R to link radian to the currently default R version 4.1.3, I get the following error:

Traceback (most recent call last):
File "/home/user303/.local/bin/radian", line 8, in
sys.exit(main())
^^^^^^
File "/home/user303/.local/pipx/venvs/radian/lib/python3.11/site-packages/radian/app.py", line 52, in main
r_home = Rhome()
^^^^^^^
File "/home/user303/.local/pipx/venvs/radian/lib/python3.11/site-packages/rchitect/utils.py", line 66, in Rhome
raise RuntimeError("R binary ({}) does not exist.".format(os.environ['R_BINARY']))
RuntimeError: R binary (/opt/R/current/lib/R) does not exist.

Which is strange because it does exist. If I start RStudio instead of VSC + radian it works like intendet.
However it gets more strange if I check the radian version radian --version:

radian version: 0.6.9
r executable: /opt/R/4.1.3/lib/R/bin/R
r version: 4.1.3
python executable: /home/user303/.local/pipx/venvs/radian/bin/python
python version: 3.11.2

With this I thought radian would use the desired version despite the error message above. So I started VSC, opened a new R terminal and typed R.version and got:

platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status Patched
major 4
minor 2.2
year 2022
month 11
day 10
svn rev 83330
language R
version.string R version 4.2.2 Patched (2022-11-10 r83330)
nickname Innocent and Trusting

You can imagine that I'm very confused and I appreciate any help.

System

  • Debian 12 Bookworm
  • radian 0.6.9
  • python 3.11.2
  • rig 0.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant