-
Notifications
You must be signed in to change notification settings - Fork 128
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
Setup with conda installed R: attaching active Terminal fails #1487
Comments
The system call to
This seems unrelated to using conda or not, in my case without conda. I did not readily find the reason for why the system call is composed like this. @skwde This worked for me to fix:
Subsequently,
|
@rfhb thanks for the suggestion but this doesn't solve the problem. I tried re-adding as you suggested but the problem keeps reappearing. "r.rterm.option": [
"--no-save --no-restore"
], Then I get The terminal process "<path to base>/.conda/envs/r/bin/radian '--no-save --no-restore'" terminated with exit code: 2. It looks like the problem is that the parameters are included inside It actually also fails when I set "r.rterm.option": [], The terminal process "<path to base>/.conda/envs/r/bin/radian" terminated with exit code: 1. |
Hey there, did you find a solution to your problem? |
@botsunny Unfortunately no... |
I have nearly the same environment set up and the same issue. It's odd because running Setting
However! Adding your R binary to the options list does seem to work for now.
|
I hope this helps you guys. A solution that I found was to work with conda + vscode + renv. Each project that I work on has its own conda environments (stored at This is a reproducible set-up:
name: conda_envs/r
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- r-base=4.1.2
prefix: conda_envs/r
conda env create --prefix conda_envs/r -f r.yml
conda activate conda_envs/r
# Install packages using renv
# If you have conda_envs in .gitignore, do not need to do it.
echo "conda_envs" > .renvignore
R -e 'install.packages(c("renv"), repos = "http://cran.us.r-project.org")'
R -e 'renv::init()'
R -e 'renv::install(c("languageserver", "httpgd", "jsonlite", "rlang"))' # libs necessary for vscode
{
"r.plot.useHttpgd": true,
"r.rpath.linux": "${workspaceFolder}/conda_envs/r/bin/R",
"r.rterm.linux": "${workspaceFolder}/conda_envs/r/bin/R" // radian will not work
}
Still trying to figure out how to get radian working in this setup. I think the trick is to tell radian which R to use, for instance |
Describe the bug
conda installed packages are not found;
not possible to attach active terminal session.
To Reproduce
Use following environment file to install R
and run
to install the environment.
Ensure the settings as mentioned below.
Next clikc on
R: (not attached)
in the status bar in VSCode and get the errorCan you fix this issue by yourself? (We appreciate the help)
No
(If applicable) Please attach
setting.json
Expected behavior
Terminal should attach
Screenshots
If applicable, add screenshots to help explain your problem.
You can show the keyboard contents by pressing
F1
andDeveloper: toggle screencast mode
Environment (please complete the following information):
Additional context
I already tried what is suggested here https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher#advanced-usage-for-self-managed-r-sessions as mentioned in this issue
could not find function ".vsc.attach"
#1094.EDIT:
There are also following related issues
The text was updated successfully, but these errors were encountered: