windows terminal

  1. install windows terminal from the microsoft store (search microsoft store) in your start menu. windows terminal is pretty much just a nicer way to use powershell, command prompt etc. it has tabs and supports copy/paste and also lots of other nice things - any time I say to run a command in this guide I probably mean for you to do it in powershell within windows terminal or in vscode.
  2. open windows terminal (make sure it opens powershell in windows terminal; if it doesn’t, click the drop-down arrow (⌄) next to the new tab button (+) and select powershell.
  3. run py --version or py -V (case sensitive). if you already have python installed, it will show Python x.x.x. if it gives you an error, you need to install python on windows. if it shows a version less than/older than 3.10, you should probably install a newer version. in either of these cases, follow the steps under install python on windows. otherwise, skip that section and proceed to git setup.

install python on windows

  1. download the 64-bit python 3.10.11 installer from this link.
  2. run the installer. check the following boxes (if any of them are grayed out, don’t worry about those):
    • Install launcher for all users (recommended)
    • Add Python 3.10 to PATH
  3. click “Customize installation”. check the following boxes (if any of them are grayed out, don’t worry about those):
    • Documentation
    • pip
    • tcl/tk and IDLE
    • Python test suite
    • py launcher
      • for all users (requires elevation)
  4. click “Next”. check the following boxes:
    • Install for all users
    • Associate files with Python (requires the py launcher)
    • Create shortcuts for installed applications
    • Add Python to environment variables
    • Precompile standard library
  5. click “Install”. grant administrator permissions if it asks.
  6. run py --version again. it should show Python 3.10.11. if it doesn’t work, close windows terminal and any vscode and/or powershell windows you might have open, then reopen windows terminal and try running it again. if it still doesn’t work, restart your computer.

git setup

  1. type git in windows terminal. if it shows an error, install git from this link, and then try the command again. restart your computer if it doesn’t work after installing.
  2. follow the steps under configure git in the official computational setup, but do it in windows terminal.
  3. follow the steps under add an ssh key to github in the official computational setup, but do it in windows terminal. when it tells you to run cat .ssh/id_ecdsa.pub in Ubuntu, run type .ssh/id_ecdsa.pub in windows instead. you may need to change the file path in the command to wherever ssh-keygen put it (it should tell you where).
  4. clone your repo to somewhere you’d like to work on it in windows the same way you would in Linux (git clone git@github.com:example-user/example-repo.git).

vscode setup

  1. open vscode. if it starts trying to connect to wsl, click the button at the bottom left of the window and select “Close Remote Connection”.
  2. go to the extensions sidebar menu (Ctrl+Shift+X). install the python extension pack. you might need to install a couple other extensions along the way, but vscode will probably recommend them automatically.
  3. you’re pretty much all set now. open your cloned repo folder and start editing your code, etc etc. it might ask you to select a python interpreter - select “Python 3.10.11”; the file path next to it should be in program files. it will probably also tell you you’re missing some libraries and stuff since you’re now working on a fresh python installation. you can install them with pip install (e.g. pip install pygame for pygame) in the terminal at the bottom of the window, or any other powershell window. if pip doesn’t work, restarting your computer should fix it (you should only have to do it once), but it should work if you put py -m before your pip command (e.g. py -m pip install pygame). I think that will work whether or not you restart first, but i’m not 100% sure about that. there might be other popups asking you to configure other stuff. generally whatever it recommends should be fine, but use your common sense.

I think that’s it, but let me know if you have any questions or problems. generally, if things aren’t working in terms of python weirdness (not finding libraries etc), try restarting vscode or your computer.