/pydev

Python development container

Primary LanguageJupyter Notebook

VSCode Usage:

  • if you have an imported distro, make sure to set a non-root default user for the distro in /etc/wsl.conf:
    [user]
    default = myusername
    
    (After making the change, restart the distro with wsl -t distroname from an windows terminal)
  • in WSL, git clone this repo and cd into it.
  • create a python veirtual environment with python -m venv .envs/dev
  • and source it: source .envs/dev/bin/activate
  • pip3 install -r requirements.txt to install pylint and other useful stuff
  • code . to start vscode in current folder
  • in VS Code taskbar, select Python interpreter "Python 3.xxx ('dev': venv)", now pylint etc should become available

VS Code Python Cheat Sheet

  • shift + enter run currentline/selection
  • F9 toogle breakpoint in current line
  • F5 Run+Debug; next step. (to cancel the running script and debugger, press ctrl + F5)