Python on Windows

21 March 2025

Python on Windows is something that doesn’t really make sense.1

However you may wish to do it anyway; perhaps you want to use Chrome webdriver in non-headless mode, in which can you can’t then run in in Linux in WSL, which is the sensible way to run Python on Windows.

For Python on Windows:

  • Install the Python from python.org
    • If you’re not sure which version you want to download, it’s likely ‘Windows installer (64-bit)’
  • Run cmd
  • Run py --list-paths

You will get something like the below most likely

 -V:3.13 *        C:\Users\UserName\AppData\Local\Programs\Python\Python313\python.exe
  • To run a specific version of python on windows you can use e.g. py -V:3.13

  • You can run this to check you get python and then type exit when you are done

  • We can use this to get a venv in the current folder: py -V:3.13 -m venv venv

  • Activate the venv and you’re off to the races: .\venv\Scripts\activate.bat

(venv) C:\Users\UserName\wherever>python
Python 3.13.2 (tags/v3.13.2:4f8bb39, Feb  4 2025, 15:23:48) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

  1. With apologies to Dr. Johnson: “Installing Python on Windows is like a dog’s walking on his hind legs. It is not done well; but you are surprised to find it done at all.”