Could not start the Julia language server. Make sure the `julia.environmentPath` setting is valid

Hi, I’m new to MacOs, and currently want to use VS Code to run julia into the system but there’s notification:

Could not start the Julia language server. Make sure the julia.environmentPath setting is valid.

I’ve read here that I need to:

edit your configuration settings, execute the Preferences: Open User Settings command (you can also access it via the menu File->Preferences->Settings ), and then make sure your user settings include the julia.executablePath setting. The format of the string should follow your platform specific conventions, and be aware that the backlash \ is the escape character in JSON, so you need to use \\ as the path separator character on Windows.

But since I’m very new to Mac and Julia, I have no clue how to do it. Thank you.

Have you installed julia?
If not, I’d recommend first installing it via juliaup: GitHub - JuliaLang/juliaup: Julia installer and version multiplexer

This should add it to your path so vocode can find it.

If you’ve already installed it, but vscode still can’t find julia, I’d recommend starting Julia from the command line, and then running Sys.BINDIR to get the path.

I’ve installed Julia and the path location is /Volumes/Julia-1.8.1/Julia-1.8.app/Contents/Resources/julia/bin
However, when I tried to put this at settings.json in Vscode

{
“workbench.colorTheme”: “Default Light+”,
“terminal.integrated.commandsToSkipShell”: [
“language-julia.interrupt”
],
“julia.symbolCacheDownload”: true,
“julia.environmentPath”: “/Volumes/Julia-1.8.1/Julia-1.8.app/Contents/Resources/julia/bin”,
“julia.enableTelemetry”: true
}

it didn’t work. It is stated:

Could not start the Julia language server. Make sure the julia.executablePath setting points to the Julia binary.

Thank you

That’s just a confusing error message. Put

 “julia.executablePath”: “/Volumes/Julia-1.8.1/Julia-1.8.app/Contents/Resources/julia/bin/julia”,

into your settings instead of

 “julia.environmentPath”: “/Volumes/Julia-1.8.1/Julia-1.8.app/Contents/Resources/julia/bin”,
1 Like

it still show me error. How to get the julia executable path and julia environment path?
It kinda hopeless, been installed and uninstalled vs code and julia several times but still don’t work :persevere:.
Meanwhile,

{
“workbench.colorTheme”: “Default Light+”,
“terminal.integrated.commandsToSkipShell”: [
“language-julia.interrupt”
],
“julia.symbolCacheDownload”: true,
“julia.environmentPath”: “”,
“julia.enableTelemetry”: true,
“julia.executablePath”: “”,

}

thank you

What error message do you get now?

Note that julia.executablePath should be /Volumes/Julia-1.8.1/Julia-1.8.app/Contents/Resources/julia/bin/julia like @pfitzseb mentioned above.

{
“terminal.integrated.commandsToSkipShell”: [
“language-julia.interrupt”
],
“julia.symbolCacheDownload”: true,
“julia.enableTelemetry”: true,
“julia.environmentPath”: “C:/Users/Ana Carolina/AppData/Local/Programs/Julia-1.8.2/bin/julia”,
}

Anyone can help me to solv yhis problem, : Could not start the Julia language server. Make sure the julia.environmentPath setting is valid.

1 Like

after several updates and time spending, apparently it works!
I’ve read that M1 chip has lot of issue. I have similar problem installing openLCA. For the julia installation, I change the path, update the Mac and works. For openLCA didn’t work at all so I installed the previous version and then it works.

1 Like

this was the same issue as me.

  1. Make sure you update the the Mac software to the newest version
  2. Make sure the julia is properly installed, it should be inside the Application. If you found it inside your application, drag it to terminal and that’s your location of julia path.
  3. if it not properly installed, you could consider install the rosetta Install Rosetta on Macbook M1 chip fails - Apple Community
1 Like

Instead of using default path, change install path to C:\Program Files\ (you may need to run the installer as an Admin) and make sure you add Julia to PATH