Handling a different version of Julia

Hello everyone,

I am a newbie to Pumas, but I’ve been using Julia (v1.7.3) for over 2 years. After installing Pumas 2.4.1 desktop client, my VS Code’s default Julia version changed to v1.9.2. I have many projects (and corresponding packages) installed for v1.7.3. Unfortunately, I could not find a straightforward way to switch between different versions of Julia in VS Code anywhere on this site. I would prefer dealing with non-Pumas projects of mine being handled by the vanilla Julia rather than the version of Julia that I got from downloading Pumas.

My request is the following: could someone tell me how to isolate the vanilla Julia installed on a machine from the Pumas+Julia combination installation in VS Code and how to switch between them?

Many thanks,
vembha

Hello Vembha,

It should be possible to use a normal Julia 1.7 installation with non-Pumas related projects by adjusting the Julia settings for specific workspaces. Essentially you need to point to a different executable in the workspace settings as well as ensure that no other Pumas specific settings are set. Please refer to Visual Studio Code User and Workspace Settings and Julia in Visual Studio Code for the details.

Best
Andreas

1 Like

Hi Andreas,

Just wanted to confirm with you if the executable path for pumas julia needs to be in global(User) settings in VSCode?
I was looking ways to set normal julia executable pathway as my global settings and make Pumas julia run in specific workspaces, but it didn’t let me and I assume because of the additional arguments?

Thanks,

Jin

I believe it should be possible to move the setting to project specific setting and thereby allow you to have different Julia related settings.

I wanted to share what I’ve found to set regular julia in global settings and pumas+julia by directory specific.

Set regular julia in global settings

  1. Open Show and Run Commands (cmd + shift + p) and type Preferences: Open User Settings
  2. type julia and under User tab and navigate to Julia: Environment Path and click Edit in settings.json
  3. Link executablePath in settings.json file and save.
    image

Set pumas+julia by project specific

  1. Open workspace and navigate to Julia:Environment Path under Workspace tab and click Edit in settings.json. settings.json file will be created under .vscode folder
  2. Paste pumas+julia.json text into settings.json and save
  3. Confirm pumas+julia environment with the license info on REPL
    image

I don’t know settings command in detail, but this worked well for me

1 Like