Launching REPL with older version in VSCode

Hello all. I have an older julia project that I need to work on. My current latest julia version is v1.11 but my project environment is built around v1.9. I want to launch a julia REPL within VSCode (e.g. Julia: Start REPL) that launches v1.9.

  1. I am using juliaup and have both v1.9 and 1.11 avaliable.
  2. I have changed the vscode environment to v1.9

  1. I have changed the executablePATH in settings.json

“julia.executablePath”: “/Users/wrholmes/.julia/environments/v1.9”,
“julia.languageServerExecutablePath”: “/Users/wrholmes/.julia/environments/v1.9”

  1. I’ve restarted VSCode to ensure everything takes.

However, when I start a VSCode REPL, it always starts in v1.11.4. I can easily start a REPL from terminal with v1.9. But that is not a VSCode REPL.

Is there a way to start a VSCode REPL with an old version? I’ve found a number of topics on this but they all point to changing the executablePATH, which I have done.

If you’re using juliaup you shouldn’t have a Julia installation at that location, it would be something like

Users/wrholmes/.julia/juliaup/julia-1.9.4+0.x64.w64.mingw32/bin/

Thanks for the response. You are correct. I started using juliaup after starting with julia. So I probably have some old environment folders laying around. Unfortunatly this doesn’t fix things. If I correct the path variables to the below, the REPL still launces to v1.11.

"julia.executablePath": "/Users/wrholmes/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/bin",

"julia.languageServerExecutablePath": "/Users/wrholmes/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/bin"

Calling versioninfo() confirms the REPL is still in v1.11.

If I just open a regular REPL from the command line (julia +1.9.4), I get the version I want. But I can’t get VSCode to open a REPL in this version.

Actually setting the executable path to julia +1.9 should work:

although it’s not working for me (but I get a “file not found” error, rather than VSCode starting some other Julia version)

In looking at the link you sent I just realized my error. The executablePath still wasn’t quite right. Below is the correct path.

"julia.executablePath": "/Users/wrholmes/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/bin/julia",

"julia.languageServerExecutablePath": "/Users/wrholmes/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/bin/julia"

I forgot to add the “julia” at the end of the path variables and only directed it to the bin folder. With this path the REPL launches with the correct version.

Thank you for the response! It was a big help.

1 Like