# Opening the ARE jupyterlab session on VS code

**URL:** <https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214>\
**Category:** Technical\
**Tags:** python, jupyter, vscode\
**Created:** [4 July 2024 13:32 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214 "2024-07-04T13:32:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sb4233](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sb4233](https://forum.access-hive.org.au/u/sb4233)\
**Post date:** [4 July 2024 13:32 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/1 "2024-07-04T13:32:58Z")

</div>

Hello everyone,

I want to open a running ARE jupyterlab session in my vs code. I can connect to the remote host through vs code but the part which I can’t seem to figure out is how to open an already running ARE jupyterlab session in my vs code. I have never tried this so a detailed instruction would be much appreciated. Thank you!

Kind regards,  
Sougata

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [4 July 2024 22:50 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/2 "2024-07-04T22:50:10Z")

</div>

Hi Sougata,  
I followed these instructions from @atteggiani and it worked for me

> [@Working with Jupyter notebooks on gadi/ARE via VS Code](https://forum.access-hive.org.au/t/working-with-jupyter-notebooks-on-gadi-are-via-vs-code/461/2):
>
> Hi @navidcy, It is possible to connect to an ARE session via VSCode (and then use any VSCode extension, for example Jupyter and Python extension to work with .ipynb files similarly to what you would do in a jupyterlab session). To do so you will have to install the “Remote - SSH” extension (or the whole “Remote Development” pack). To install the remote-ssh extension from your command line you can type code --install-extension ms-vscode-remote.remote-ssh. A complete guide on how to install, se…

Regards,  
David

---

<div class="post-metadata">

**Author:** ![Paola-CMS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/paola-cms/32/57_2.png) [@Paola-CMS](https://forum.access-hive.org.au/u/Paola-CMS)\
**Post date:** [4 July 2024 23:20 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/3 "2024-07-04T23:20:41Z")

</div>

There’s also this blog:  
[https://coecms.github.io/posts/2023-05-31-vscode-are.html](https://coecms.github.io/posts/2023-05-31-vscode-are.html)

Edit: URL updated

---

<div class="post-metadata">

**Author:** ![sb4233](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sb4233](https://forum.access-hive.org.au/u/sb4233)\
**Post date:** [5 July 2024 01:46 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/4 "2024-07-05T01:46:04Z")

</div>

Thanks!  
I tried this method, but it says that it can’t establish the connection.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/access1/original/2X/e/edec40d4a7645a53bb15d0c85fc7ef6c8c1c9b84.png)

---

<div class="post-metadata">

**Author:** ![sb4233](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sb4233](https://forum.access-hive.org.au/u/sb4233)\
**Post date:** [5 July 2024 02:17 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/5 "2024-07-05T02:17:21Z")

</div>

It worked. Had to remove the **`usekeychain`** part in the config file.

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [5 July 2024 02:20 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/6 "2024-07-05T02:20:43Z")

</div>

Awesome.

Which instructions did you follow? If you [mark that post as a solution](https://forum.access-hive.org.au/docs?topic=276#marking-a-solution-4) it will be referenced below your original post and make it easier for others to find.

---

<div class="post-metadata">

**Author:** ![ag0498](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@ag0498](https://forum.access-hive.org.au/u/ag0498)\
**Post date:** [11 September 2024 03:26 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/7 "2024-09-11T03:26:14Z")

</div>

I also tried the steps in @Paola-CMS’s link above, and also had to remove the `usekeychain` parameter.

However I am stuck at a later stage: when I try to connect, VSCode asks which platform, I select Linux, and then I get an error:

```auto
[13:18:09.256] Got some output, clearing connection timeout
[13:18:09.320] > Acquiring lock on /home/548/ag0498/.vscode-server/bin/6509174151d557a81c9d0b5f8a
> 5a1e9274db5585/vscode-remote-lock.ag0498.6509174151d557a81c9d0b5f8a5a1e9274db558
> 5
[13:18:09.353] > Installing to /home/548/ag0498/.vscode-server/bin/6509174151d557a81c9d0b5f8a5a1e
> 9274db5585...
> 6d2233bdeaf6%%1%%
> Downloading with wget
[13:18:09.507] > wget download failed
> failed: Network is unreachable. failed: Network is unreachable.
> printenv:
> SSH_CONNECTION=1.1.1.1 35198 a.b.c.d 22 (note: edited for posting here)
> TZ=:/etc/localtime

<<< SNIP>>>

> OLDPWD=/home/548/ag0498
> Trigger local server download
> 6d2233bdeaf6:trigger_server_download
> artifact==server-linux-x64==
> destFolder==/home/548/ag0498/.vscode-server/bin/==
> destFolder2==/6509174151d557a81c9d0b5f8a5a1e9274db5585/vscode-server.tar.gz==   
> 6d2233bdeaf6:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/548/ag0498/.vscode-server/bin/6509174151d557a81c9d0b5f8a5a1e92
> 74db5585/vscode-server.tar.gz.done and vscode-server.tar.gz to exist
> 
[13:18:09.520] Got request to download on client for {"artifact":"server-linux-x64","destPath":"/home/548/ag0498/.vscode-server/bin//6509174151d557a81c9d0b5f8a5a1e9274db5585/vscode-server.tar.gz"}
[13:18:09.521] Downloading VS Code server locally...
[13:18:10.703] Resolver error: Error: XHR failed
    at y.onerror (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:78:1261)
[13:18:10.710] ------

```

Apologies for the long log chunk but I think the important point is that it tries to download VSCode Server, wget fails, so it triggers a “local” (on my local machine?) download, which fails with XHR error, whatever that is.

I tried installing VSCode manually on my gadi home folder (~/.vscode-server) but that doesn’t seem to have changed anything (perhaps not seen?).

All ideas and suggestions appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [11 September 2024 06:58 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/8 "2024-09-11T06:58:00Z")

</div>

> [@ag0498](#):
>
> ```auto
> failed: Network is unreachable. failed: Network is unreachable.
> 
> ```

This is a classic error when trying to run something from a PBS job as the compute nodes don’t have direct internet access.

I’m not sure of the context of your failure, but just thought I’d point that out in case it is at all relevant.

---

<div class="post-metadata">

**Author:** ![ag0498](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@ag0498](https://forum.access-hive.org.au/u/ag0498)\
**Post date:** [11 September 2024 21:40 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/9 "2024-09-11T21:40:48Z")

</div>

Thanks Aidan. I’m using ARE, so I wouldn’t expect internet access problems. Have I misunderstood that ARE jobs can now see the 'net? I don’t recall having trouble e.g. downloading Cartopy feature geometries or uploading things to Amazon buckets from ARE sessions…

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [11 September 2024 23:42 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/10 "2024-09-11T23:42:10Z")

</div>

> [@ag0498](#):
>
> I’m using ARE, so I wouldn’t expect internet access problems. Have I misunderstood that ARE jobs can now see the 'net?

No you are correct. I just suggested it in case it was relevant.

In general I’d also recommend closing the session and trying again, to see if the problem is reproducible.

If so then I’d ask for help from NCI (help@nci.org.au).

---

<div class="post-metadata">

**Author:** ![sb4233](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sb4233](https://forum.access-hive.org.au/u/sb4233)\
**Post date:** [12 September 2024 01:32 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/11 "2024-09-12T01:32:10Z")

</div>

Also keep in mind that there is a NCI facility maintenance going on and the system will be offline from _ **5:00 am AEST Thursday 12 September to 6:00 pm AEST Friday 13 September** _. So, all the services are unavailable for this time period.

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [13 September 2024 05:31 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/12 "2024-09-13T05:31:05Z")

</div>

If you’re sshing to a ARE node, I think it might be the ARE container that grants you internet access which you won’t have if you ssh in. Try first starting up ARE in the `copyq` queue, which will have network access for vscode to download its stuff, then the other queues should have the download already available.

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [19 October 2025 23:39 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/13 "2025-10-19T23:39:34Z")

</div>

Hi everyone! I am having trouble selecting the conda environments in VS code. I am trying to point it here: `/g/data/xp65/public/apps/med_conda/envs/analysis3-25.09/bin/python3.6/`, but it tells me the path is invalid. Has anyone had any success using jupyter notebooks from VS code **not using hh5?** @atteggiani maybe you know?

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [20 October 2025 00:15 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/14 "2025-10-20T00:15:42Z")

</div>

> [@JuliaN](#):
>
> /g/data/xp65/public/apps/med\_conda/envs/analysis3-25.09/bin/python3.6/

That path is not valid. The `conda/analysis3` environments are in `/g/data/xp65/public/apps/med_conda_scripts/`, and they have a `.d` suffix in their env folder names.  
For example the `analysis3-25.09` python exe would be `/g/data/xp65/public/apps/med_conda_scripts/analysis3-25.09.d/bin/python3.11`

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [20 October 2025 00:22 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/15 "2025-10-20T00:22:56Z")

</div>

> [@atteggiani](#):
>
> /g/data/xp65/public/apps/med\_conda\_scripts/analysis3-25.09.d/bin/python3.11

Amazing! Thank you Davide!

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [10 November 2025 03:05 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/16 "2025-11-10T03:05:12Z")

</div>

Hey @atteggiani I have another question for you! Do you know why I get this error when running through VS Code instead of ARE’s jupyter lab?

```auto
ERROR 1: PROJ: proj_create_from_database: Open of /g/data/xp65/public/./apps/med_conda/envs/analysis3-25.09/share/proj failed

```

I know it’s cartopy related because it happens when I import the module, but it also happens when using intake or xarray.

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [10 November 2025 22:47 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/17 "2025-11-10T22:47:18Z")

</div>

Hey @JuliaN,

Without a bit more context it is hard to figure out why the error might have occurred.

What was the command that raised the error?  
You were within a VSCode instance using Remote-SSH to an ARE job? Did you have any module loaded?  
If you do the exact same thing in a jupyterlab it works fine?

Cheers  
Davide

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [11 November 2025 00:13 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/18 "2025-11-11T00:13:29Z")

</div>

Sorry about that!

There are multiple commands that raise the error. Examples are `import cartopy.crs as ccrs`, or a simple xarray operation like `ds.sel(lat=slice())`

I was using VSCode with remote SSH to an ARE job as per the instructions in this post.

Doing the exact same thing in jupyterlab works fine.

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [11 November 2025 00:38 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/19 "2025-11-11T00:38:44Z")

</div>

Thank you for the info.

Could you please list all the steps for me to reproduce the error? If you spin up an ARE session, please list all the settings used.

Thank you

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [11 November 2025 01:05 UTC](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214/20 "2025-11-11T01:05:14Z")

</div>

Yes! I follow the instructions [here](https://21centuryweather.github.io/21st-Century-Weather-Software-Wiki/gadi/vscode.html) to use VSCode with an ARE session. I then select the python interpreter you pointed to in some comments above (`/g/data/xp65/public/apps/med_conda_scripts/analysis3-25.09.d/bin/python3.11`).

And then I run some notebooks. Like I said the error pops up in numerous lines, the simplest one of them being importing cartopy (`import cartopy.crs as ccrs`). I’ve created a [gist](https://gist.github.com/julia-neme/a9a98eac5f503b47f493d47830194da6) with a notebook from our cosima recipes repository. You can see the errors there. These do not happen when using jupyterlab with the same environment.

Thank you very much for your help!

NOTE: the reason I’m being so annoying and trying to get VSCode working nicely is that I’ve been going crazy with jupyter lab’s glitches ( [Glitch in jupyter-lab on ARE xp65](https://forum.access-hive.org.au/t/glitch-in-jupyter-lab-on-are-xp65/5337) ). It has ruined code for me already that took a long time to re-write.

[Next page](https://forum.access-hive.org.au/t/opening-the-are-jupyterlab-session-on-vs-code/2214.md?page=2)
