# How do I add \[1.5.3\] to VS code in Ubuntu?

**URL:** <https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127>\
**Category:** General Usage\
**Tags:** question, linux, vscode\
**Created:** [January 10, 2021, 11:03pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127 "2021-01-10T23:03:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 10, 2021, 11:03pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/1 "2021-01-10T23:03:08Z")

</div>

I downloaded 1.6.0 into a file called Julia in my home directory.

I tried to enter

```julia
export PATH="$PATH:/path/to/~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin"

```

into VS Code, so it would find this file, but instead it says it can’t find the directory.

```julia
The terminal process failed to launch: Path to shell executable "export PATH="$PATH:/path/to/~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin"" does not exist.

```

---

<div class="post-metadata">

**Author:** ![xzackli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xzackli/32/38301_2.png) [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Post date:** [January 10, 2021, 11:11pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/2 "2021-01-10T23:11:44Z")

</div>

> [@brett\_knoss](#):
>
> `/path/to/~/`

This should be replaced with `~/` since this current directory doesn’t point to your home. I’m not sure if vscode properly expands `~`, so you could also try `$HOME`.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 3:12am UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/3 "2021-01-11T03:12:33Z")

</div>

like this:

```julia
export PATH="$HOME:~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin"

```

now it’s saying:

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

```

---

<div class="post-metadata">

**Author:** ![xzackli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xzackli/32/38301_2.png) [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Post date:** [January 11, 2021, 4:08am UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/4 "2021-01-11T04:08:48Z")

</div>

Sorry, I wasn’t very clear. If you are doing development in Julia using the Linux shell, I believe the correct export command for you is

```julia
export PATH="$PATH:$HOME/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin"

```

The $HOME environmental variable just expands to the path of your home directory. The part at the beginning with`$PATH:` causes the export to append to, rather than overwrite, your PATH.

Since you’re doing development in VS Code, you might have to set up the correct path for the language server to find. In your VS Code settings JSON file (there is a button in the top right corner of the settings interface), you can specify the executable path for the language server. For example, here is an excerpt from my settings file, modified to what I believe is your setup.

```julia
{
  "julia.enableTelemetry": true,
  "julia.executablePath": "${env:HOME}/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin/julia",
  "julia.NumThreads": 6,
}

```

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [January 11, 2021, 8:05am UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/5 "2021-01-11T08:05:41Z")

</div>

FWIW, the language server doesn’t support 1.6 atm.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 4:14pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/6 "2021-01-11T16:14:55Z")

</div>

What about 1.5.3?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [January 11, 2021, 6:15pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/7 "2021-01-11T18:15:24Z")

</div>

Works fine.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 6:38pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/8 "2021-01-11T18:38:04Z")

</div>

Ok thanks, I get the Path I think, what do I put in the JSON?

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 7:25pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/9 "2021-01-11T19:25:07Z")

</div>

I’m still getting the same error as before. I went to the bin folder, and it contains an executable file. is this the right folder, or do I need to find a folder with a .bin file?

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 7:33pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/10 "2021-01-11T19:33:49Z")

</div>

I just found this error

```julia
Command failed: "export PATH="$PATH:$HOME/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin"" --startup-file=no --history-file=no -e "using Pkg; println.(Pkg.depots())"
/bin/sh: 1: export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/brett/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin: not found
 `"export PATH="$PATH:$HOME/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin"" --startup-file=no --history-file=no -e "using Pkg; println.(Pkg.depots())"` (exited with error code 127)

```

what files should be in the folder that I’m connecting to?

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 11, 2021, 7:41pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/11 "2021-01-11T19:41:57Z")

</div>

Could you post your `.bashrc` or wherever you have the `export` command saved? Also could you post your VS Code settings (Click File → Settings) and show us your Julia executive path variable?

It seems like you put the verbatim command `export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/brett/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin` in the **executable path** variable of VScode, which is completely wrong.

Here are two solutions.

1. add an `export` statement to your .bashrc so that the Julia folder is in `PATH` as soon as you login to bash. Then if done properly, you don’t really need to fill in the executable path variable in VSCode.

2. Ignore the `export` part (but you’ll lose the ability to simply type in `julia` anywhere in bash to launch). In this case, simply add the correct path to the `executable path` variable in VSCode.

In summary, either you allow vscode to find Julia by going through the `$PATH` variable (which is what I would suggest) or you manually tell VScode where your Julia is by filling in the `executable path` variable in VSCode… I don’t think you need to do both.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 7:47pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/12 "2021-01-11T19:47:47Z")

</div>

![Screenshot from 2021-01-11 13-46-20](https://global.discourse-cdn.com/julialang/original/3X/d/d/dd5d826e69e34c0d2a8bf50c075bcacf339f0412.png) ![Screenshot from 2021-01-11 13-46-45](https://global.discourse-cdn.com/julialang/original/3X/6/b/6b2b622cff9ae71845cc5f80465eec0a52a97cfb.png)

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 11, 2021, 7:56pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/13 "2021-01-11T19:56:23Z")

</div>

As I suspected. When Julia is asking for a `executable path` … don’t put an `export` statement there. That’s obviously not a path. A path in Linux is in the form `/home/user/folder1/folder2/...`. And `export` is a linux command, nothing to do with VScode or Julia.

In Linux when you type in `julia` or any other command/executable, Linux needs to know where this executable exists on the file directory. It traverses through a variable called `$PATH` which contains a list of common directories that include binaries/executables. The default folders it searches are often `/usr/local/bin`, `/usr/bin`. In fact you can see all the folder it searches by running

```julia
affan@XPS13:/mnt/c/Users/affan$ echo $PATH
/home/affan/anaconda3/bin:/home/affan/anaconda3/condabin:/home/affan/.rbenv/plugins/ruby-build/bin:/home/affan/.rbenv/shims:/home/affan/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files (x86)/WinSCP:/mnt/c/Program Files/dotnet:/mnt/c/Users/affan/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/affan/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64:/mnt/c/Users/affan/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/affan/perl/perl/bin:/mnt/c/Users/affan/AppData/Local/Julia-1.3.0/bin:/snap/bin

```

So when you type in `julia` no matter where you are in the file system, Linux needs to know where the binary actually is. We accomplish this by using the command `export`, which essentially defines a variable in bash. So in your terminal (assuming you have bash), you can run

```julia
 export PATH="/home/affan/path/to/julia/bin:$PATH"

```

Note the `$PATH` at the end, which essentially takes the old `$PATH` and appends your julia folder on top. If you just run `export PATH="/home/affan/path/to/julia/bin"` without the `$PATH` append, you are going to severely break your system. If you do this successfully, you should be able to just type in `julia` in your terminal and it should just launch (and infact sets the `pwd` to that directory, which is handy).

From a VSCode point of view, now you don’t really need to do anything. The VScode extension automatically uses `$PATH` to find the julia binary, so you can leave it blank. Ofcourse, if you don’t do the above and do not modify your `$PATH` variable, then you’ll need to explicitly tell the vscode extension where julia is. I would highly recommend just setting the path once and for all.

We are not done yet. By typing in `export PATH="/home/affan/path/to/julia/bin:$PATH"` in your terminal, you are only changing the variable for that particular instance and will lose the modified variable the next time you login to your terminal/restart your computer. So we need a way to automatically run this command whenever you login/start your computer. Enter the file `.bashrc` in your home directory which is a special file that is run automatically everytime you open terminal/bash. You can edit this file and copy/paste the command `export PATH="/home/affan/path/to/julia/bin:$PATH"` so that you don’t have to keep doing it anymore.

If you are using zsh or some other shell, you have to put the export statement in the correct start-up file, instead of `.bashrc`. However, I don’t think you need to worry about this.

Other ways to accomplish similar things is not modifying your `$PATH` but creating a symlink in `/usr/local/bin` (which is already in `$PATH` by default). As far as I am aware, this is the canonical location for user downloaded binaries, but this might be a little too advanced for now. Just stick with setting the path correctly.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 8:31pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/14 "2021-01-11T20:31:48Z")

</div>

So does that mean I put

```julia
export PATH="~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin:$PATH"

```

in the terminal to create a path to VS Code? (if it allows 1.6 beta, else)

```julia
export PATH="~/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin:$PATH"

```

and then leave the executable path empty?

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 11, 2021, 8:50pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/15 "2021-01-11T20:50:08Z")

</div>

Yes. Properly set up your path and leave the `executable path` empty. I’d also just advise sticking with 1.5.3 for now since the vscode extension is not updated for 1.6. If you do want to have both julia, you can do

```julia
export PATH="~/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin:~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin:$PATH"

```

now, here is an exercise for the reader. Both the paths `~/Julia/julia-1.5.3-linux-x86_64/julia-1.5.3/bin` and `~/Julia/julia-1.6.0-beta1-linux-x86_64/julia-1.6.0-beta1/bin` contain a binary called `julia`… so when you type in `julia` in the terminal, which one will it launch? 1.5.3 or 1.6? Try it out and let me know 🙂

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 9:06pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/16 "2021-01-11T21:06:20Z")

</div>

1.5.3

But when I type in the REPL :

julia\> ]

it becomes

(v1.0)pkg\>

should I have a 1.5.3 extension from the marketplace?

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 11, 2021, 9:12pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/17 "2021-01-11T21:12:37Z")

</div>

Are you sure you are launching `1.5.3`? You may be launching `1.0.x` as the binary for that version is likely whats being launched. This could happen if the path for the `1.0` version takes precendent in `$PATH`. What does `versioninfo()` say from the vscode terminal repl and also a regular terminal.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 9:15pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/18 "2021-01-11T21:15:29Z")

</div>

I launched 1.5.3 in the terminal, I don’t see the opening screen in VS Code, I think it’s either 1.0.4 or 1.0.10 .

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 11, 2021, 9:24pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/19 "2021-01-11T21:24:54Z")

</div>

You can launch julia in vscode by executing the command “start REPL” in vscode. I don’t know know the shortcut for linux, but for windows its “ctrl-shift-p” to bring up command launcher.

---

<div class="post-metadata">

**Author:** ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Post date:** [January 11, 2021, 9:27pm UTC](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127/20 "2021-01-11T21:27:53Z")

</div>

Linux it’s F1. I got that part, I just wasn’t sure how to select the version to run.

[Next page](https://discourse.julialang.org/t/how-do-i-add-1-5-3-to-vs-code-in-ubuntu/53127.md?page=2)
