diff --git a/learning-git/resources/img/token_3.png b/learning-git/resources/img/token_3.png deleted file mode 100644 index 2ca20e8c263307f8f1c2032b13c7b36d3358e9b6..0000000000000000000000000000000000000000 Binary files a/learning-git/resources/img/token_3.png and /dev/null differ diff --git a/learning-git/slides/compile.sh b/learning-git/slides/compile.sh old mode 100755 new mode 100644 diff --git a/learning-linux/compile.sh b/learning-linux/compile.sh old mode 100755 new mode 100644 diff --git a/learning-markdown/compile.sh b/learning-markdown/compile.sh old mode 100755 new mode 100644 diff --git a/learning-markdown/example/assets/journal-of-neurophysiology.csl b/learning-markdown/example/assets/journal-of-neurophysiology.csl old mode 100755 new mode 100644 diff --git a/learning-markdown/example/assets/references.bib b/learning-markdown/example/assets/references.bib old mode 100755 new mode 100644 diff --git a/learning-python/compile.sh b/learning-python/compile.sh old mode 100755 new mode 100644 diff --git a/learning-vscode/VSCode_WSL.md b/learning-vscode/VSCode_WSL.md index 05dc0aec19a2c36cbc6971780cbefd1345a6db8f..fe4db045c7836b815ab6b29c679d94693858da1a 100644 --- a/learning-vscode/VSCode_WSL.md +++ b/learning-vscode/VSCode_WSL.md @@ -5,7 +5,7 @@ author: P.Y. Barriat description: How to use VSCode with WSL backgroundImage: url('assets/back.png') _backgroundImage: url('assets/garde.png') -footer: 26/03/2024 | Visual Studio Code for WSL | PY Barriat +footer: 25/03/2025 | Visual Studio Code for WSL | PY Barriat _footer: "" paginate: true _paginate: false @@ -15,12 +15,12 @@ math: true Visual Studio Code for WSL<!--fit--> === -https://gogs.elic.ucl.ac.be/pbarriat/learning-vscode +https://forge.uclouvain.be/elic/learning.git  **Pierre-Yves Barriat** -ACELI Training Sessions `March 26th, 2024` +ACELI Training Sessions `March 25th, 2025` --- @@ -58,7 +58,7 @@ You must install WSL by your own with the **Administrator access** from CII inte --- - + --- @@ -83,7 +83,10 @@ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /nores --- -## Install WSL2 +## Install WSL2 + +> optional: it depends on your specific Windows 11 release (<1903) +> if your build number is lower than **18362.1049** 1. From CII interface, ask for an **Admin access** @@ -109,7 +112,7 @@ wsl --set-default-version 2 ## First configuration of Ubuntu -(Open Ubuntu) and choose a login/password +Open Ubuntu and choose a login/password  @@ -117,7 +120,6 @@ In the Ubuntu terminal do ```bash sudo apt update - sudo apt upgrade ``` @@ -126,6 +128,7 @@ sudo apt upgrade ## Graphical User Interface Open a **Powershell terminal** in **User mode** and do +> if your build number is lower than **18362.1049** ```sh wsl --update @@ -143,23 +146,19 @@ sudo apt install x11-apps -y --- -# VS Code - -You can install Visual Studio Code from the web link [here](https://code.visualstudio.com/download) +## Install Visual Studio Code from Microsft Store -> during installation, under the **Additional Tasks step**, ensure the **Add to PATH** option is checked - - + --- -Open VS Code and install **WSL for VS Code** +Open **VS Code** and install **WSL for VS Code** - + --- -Connect to WSL using a **distro** (Ubuntu 22.04) +Connect to WSL **using Distro** (Ubuntu 22.04)  @@ -190,7 +189,7 @@ import numpy as np Try to run the cell -> you must choose a Python environment first : Python 3.6 and **Install** +> you must choose a Python environment first : Python 3.10 and **Install** > >  >  @@ -208,48 +207,35 @@ So open your first **WSL terminal** in VS Code In this **Linux** terminal, do ```bash -sudo apt install python3-pip +sudo apt install -y python3-pip python3-ipykernel ``` --- Try again to run the cell ! -But now... :boom: - - - ---- - -In your **Linux** terminal, install the missing Python extension ... - -```bash -pip instal numpy -``` - - + -... and run the cell again: great, it's OK now :smiley: +Great, it's OK now :smiley: --- ## Let's try a full notebook example -Install Git : `sudo apt install git -y` +Install Git : `sudo apt install -y git` Now clone this **Git repository** ```bash -git clone https://forge.uclouvain.be/barriat/learning-vscode.git +git clone https://forge.uclouvain.be/elic/learning.git ``` -> You don't already know what's Git :question: -> Shame on you ! :confounded: +> You don't already know what's Git ? :confounded: > > **It's not to late**: take a look here -> https://gogs.elic.ucl.ac.be/TECLIM/Git_Training +> `learning/learning-git` -Now open the file `example.ipynb` +Now go in the folder `learning/learning-vscode/example` and open the file `example.ipynb` --- @@ -258,9 +244,7 @@ The first cell implies you must install some requirements To run this example, install the extensions below ```bash -pip install netCDF4 -sudo apt install libgeos-dev libgdal-dev -pip install cartopy +sudo apt install -y python3-netcdf4 python3-cartopy ``` Now, try to run all the cells of this notebook :exclamation: diff --git a/learning-vscode/VSCode_WSL.pdf b/learning-vscode/VSCode_WSL.pdf index 3aa0f154ed495b2c644f32b84e26c85555c76f3e..aede79bb5d7f6f746fb68177d531bf042542e98f 100644 Binary files a/learning-vscode/VSCode_WSL.pdf and b/learning-vscode/VSCode_WSL.pdf differ diff --git a/learning-vscode/assets/CII.png b/learning-vscode/assets/CII.png old mode 100755 new mode 100644 index eeab4f2c601a479bf8f7c65e02d8cdc28454a677..cdd579c0bb2c5a0b1a4b2d885f8d0ad0be0cca0b Binary files a/learning-vscode/assets/CII.png and b/learning-vscode/assets/CII.png differ diff --git a/learning-vscode/assets/new_ipynb.png b/learning-vscode/assets/new_ipynb.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/term_preview.png b/learning-vscode/assets/term_preview.png index 3baf9b17f24fca6dce02e2fb35ac62cd68cd8790..31e827aeabe0cd5662fdc803d84ed1107549e8b6 100644 Binary files a/learning-vscode/assets/term_preview.png and b/learning-vscode/assets/term_preview.png differ diff --git a/learning-vscode/assets/ubuntu_terminal.png b/learning-vscode/assets/ubuntu_terminal.png old mode 100755 new mode 100644 index 567a0239dd3da98adccbc041cfdce890fc678959..b787b8a0ce8bdaef850e2f9c341fca96ae8b1fa6 Binary files a/learning-vscode/assets/ubuntu_terminal.png and b/learning-vscode/assets/ubuntu_terminal.png differ diff --git a/learning-vscode/assets/ubuntu_wsl.png b/learning-vscode/assets/ubuntu_wsl.png old mode 100755 new mode 100644 index 032e61fd66cfe350b195602a12587d247538298d..63fb7517273720408a4c0aca7758957b492bafd3 Binary files a/learning-vscode/assets/ubuntu_wsl.png and b/learning-vscode/assets/ubuntu_wsl.png differ diff --git a/learning-vscode/assets/vscode_add_ext.png b/learning-vscode/assets/vscode_add_ext.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_distro.png b/learning-vscode/assets/vscode_distro.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_extensions.png b/learning-vscode/assets/vscode_extensions.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_install.png b/learning-vscode/assets/vscode_install.png index e8176ccbe56a6560835a608bf501cb3f468dd845..2974a5b45e63a2ad348eab31e9f67f88bc9c3b13 100644 Binary files a/learning-vscode/assets/vscode_install.png and b/learning-vscode/assets/vscode_install.png differ diff --git a/learning-vscode/assets/vscode_kernel.png b/learning-vscode/assets/vscode_kernel.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_missing.png b/learning-vscode/assets/vscode_missing.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_nopip.png b/learning-vscode/assets/vscode_nopip.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_pyenv.png b/learning-vscode/assets/vscode_pyenv.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_terminal.png b/learning-vscode/assets/vscode_terminal.png old mode 100755 new mode 100644 diff --git a/learning-vscode/assets/vscode_wsl.png b/learning-vscode/assets/vscode_wsl.png old mode 100755 new mode 100644 index b87dc76e9e64d3724bf006b88488ea35bf64d6d8..786566dab55971d86419a24e793b97f3fb968f44 Binary files a/learning-vscode/assets/vscode_wsl.png and b/learning-vscode/assets/vscode_wsl.png differ diff --git a/learning-vscode/compile.sh b/learning-vscode/compile.sh old mode 100755 new mode 100644 diff --git a/learning-vscode/example/example.ipynb b/learning-vscode/example/example.ipynb old mode 100755 new mode 100644 diff --git a/learning-vscode/example/prmsl.2000.nc b/learning-vscode/example/prmsl.2000.nc old mode 100755 new mode 100644