Having installed several versions of Julia on machine. How to open a specific version of julia from PowerShell?

I have two versions of Julia installed on my machine 1.6.3 and 1.8.0-beta 1. When I write julia in the PowerShell, it opens 1.6.3, how can I select the demanded version? I tried something like below, but it didn’t work

C:\> julia-1.8.0-beta1

You can call the binary for the different installations by using the full path.
julia alone opens the binary that is available using the PATH environment variable.

I usually setup a custom shell in the new windows terminal to start a specific version.

1 Like

Thank you very much.

Another issue, I have many packages installed in 1.6.3 how can I made them installed also in 1.8.0-beta 1, such coping some files…

I usually place a Project.toml or even manifest file in my project directories.

To generate them just activate the project directory in the package mode and then add the required packages. I think julia can then also use already installed packed without reinstalling.

In case you already have a Project.toml you can call instantiate in the pkg mode of the REPL to force an installation.

I usually only have very few packages installed in the default environment.

If you don’t want to use Project files you can also activate named environments by using pkg> activate @myname. I don’t know if they are available between version though.

2 Likes

The packages for the default environment are also stored in a Project.toml file.
You can find it by calling status

(@v1.7) pkg> st
      Status `~/.julia/environments/v1.7/Project.toml`
  [6e4b80f9] BenchmarkTools v1.3.1
  [c3e4b0f8] Pluto v0.18.1
  [b8865327] UnicodePlots v2.9.0

1 Like

Thank you very much.

You can also use juliaup for this scenario, see Julia in the Windows Store | David Anthoff | JuliaCon2021 - YouTube. Just make sure you uninstall your other Julia versions before you switch over to using juliaup.

2 Likes

I am not sure if it is possible, but can the Windows store version also ship with custom profiles for the Windows terminal? :smiley:

It does :slight_smile:

2 Likes