wsl setup for data enginner - saitzaw/xsql GitHub Wiki

YOU CAN ASK GEMINI OR CHATGPT TOO

Disclaimers:

- test only on the Microsoft Windows 11 Pro

Check the vritualization is on or off

  • run this command to check the virtualization in windows terminal systeminfo.exe
  • if virtualitzation is off, please open the virtualization first
  • also check in the BIOS setting too

Check the wsl is install or not

wsl -l

install wsl

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Check the wsl version

wsl -l -v

Update the wsl if the wsl is v1

If the system is already wsl 2 skip following step

Download from this link

https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel

Check support GNU/Linux list in wsl

wsl -l -o

set default for v2

wsl --set-default-version 2

If this command line is not working please use the windows update

update the wsl

wsl --update

Install Ubuntu on WSL

wsl --install -d Ubuntu-22.04

Open the wsl

wsl

Install git

sudo apt-get install git -y

Install pyenv

Install dependencies

sudo apt-get install -y git make gcc build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev

pyenv config

curl https://pyenv.run | bash

pyenv notes:

  • for safely use prefer python versions are 3.9.15, 3.8.15
  • install the python versions: pyenv install 3.9.15
  • to change the global python version from system python version using this command pyenv global 3.9.15

for detail read the pyenv documentation pyenv link

install poetry

curl -sSL https://install.python-poetry.org | python3 -

install java

before install the java please check the java version

  • sudo apt update
  • sudo apt upgrade
  • sudo apt install openjdk-11-jdk

install scala

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ sudo apt install sbt sudo apt install scala

Install VS code on windows

  • install vs code in windows and run the script or compiler in GNULinux