vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

radian not working properly with anaconda terminal

Open kendonB opened this issue 2 years ago • 1 comments

Type: Bug

I have:

  1. Installed R via Windows
  2. Installed the R VSCode extension
  3. Set up VSCode to use an Anaconda Powershell prompt as the default terminal
  4. Installed radian using pip install radian from this Anaconda terminal
  5. Set the Rterm settings to point to this radian install
  6. Open an R script and type a line of code (library(tidyverse))
  7. Run a line using Ctrl+Enter

This is what I see:

R version 4.2.3 (2023-03-15 ucrt) -- "Shortstop Beagle"
Platform: x86_64-w64-mingw32 (64-bit)

r$> C:/Users/KennyBell/anaconda3/Scripts/activate
    library(tidyverse)
    conda activate base
Error: unexpected '/' in "C:/"

r$>

And of course I expect just the library(tidyverse) line to run

So the Anaconda prompt terminal command is getting the Rterm command as an argument and it gets put before the other terminal setup commands. My terminal setup is:

    "terminal.integrated.profiles.windows": {
        "Anaconda Powershell": {
        "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
        "args": [
            "-ExecutionPolicy",
            "ByPass",
            "-NoExit",
            "-Command",
            "& 'C:\\Users\\KennyBell\\anaconda3\\shell\\condabin\\conda-hook.ps1'; conda activate 'C:\\Users\\KennyBell\\anaconda3'"
        ]
        }
    },

If I run this in cmd.exe, I get correct behaviour (with no library(tidyverse) run, though): C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy ByPass -NoExit -Command & 'C:\\Users\\KennyBell\\anaconda3\\shell\\condabin\\conda-hook.ps1'; conda activate 'C:\\Users\\KennyBell\\anaconda3' & C:\Users\KennyBell\anaconda3\Scripts\radian.exe

Extension version: 2.7.2 VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:02.548Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: Yes

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1270P (16 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.69GB (12.43GB free)
Process Argv --crash-reporter-id d9645a28-e00a-4bbf-9661-ffa7144dbc9e
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
vscrp:30673768
pythonsymbol12:30671437
showlangstatbar:30672706
vsctsb:30705553
azdwalk:30721579
pythonms35:30701012
pythonfmttextcf:30716743
pythonclientmv:30713943

kendonB avatar Apr 26 '23 02:04 kendonB

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Apr 26 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 10 '24 01:05 github-actions[bot]