Creating new Julia environment with older version

I currently have Julia 1.10.4, but I want to run Julia 1.7.3 from within VScode. I installed via juliaup, and my new install location is:
"C:\Users\####\.julia\juliaup\julia-1.7.3+0.x64.w64.mingw32\bin\julia.exe"

Then, via the terminal, I created a new environment

activate --shared test
"C:\Users\####\.julia\environments\test"
instantiate

Now my manifest.toml file looks like this:

# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.3"
manifest_format = "2.0"

[deps]

However, when I open a file from within VSCode (And I have Julia env: test) and run Pkg.activate("."), it then has versioninfo() → Julia 1.10.4.

How do I run Julia 1.7.3 from within VScode? It seems I have it installed with juliaup and I’m in that environment but it still doesn’t work. (I’ve tried explicitly added the julia.exe I have above as executable path but it says that path is not an environment).

I.e. how come when I’m in a 1.7.3 environment it still creates a 1.10 terminal/REPL?

@davidanthoff may correct me, but I don’t think VSCode picks a matching Julia version for a project (yet?), so you’ll have to manually change it in the Julia extension settings.

Does that mean changing the environment path as well in the settings.json file?

Wasn’t aware that there was one, I was thinking of this setting:

image

1 Like

Yes, we don’t pick up Julia versions from manifests (yet!).

Best way to do this right now is to put something like julia +1.7.3 into the field that @nilshg pointed to.

2 Likes