Post

Install Python on Windows

Install, setup and configure a Python environment on a Windows machine, ready for action.

Install Python on Windows

Intro

The purpose of this guide is to install both VSCode and Python onto a Windows machine using Choloatey package manager.

Then we will install the Poetry package manager to manage modules within Python environments.


Steps

  1. Install Chocolatey using PowerShell
  2. Install VSCode using Chocolatey
  3. Install Python from web
  4. Install Poetry using PowerShell
  5. Install Python extension in VSCode
  6. Create and isolate a test Python environment

Step One - Install Chocolatey

  1. Open PowerShell as an Administrator

  2. Install Chocolatey package manager

1
2
3
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Step Two - Install VSCode

  1. Run below command in existing elevated PowerShell session
1
Choco install vscode

Step Three - Install Python

  1. Navigate to and download Python from: https://www.python.org/downloads/

  2. Run install and ensure:

    • Tick admin priviledges
    • Tick add python.exe to PATH
    • Install for all users
This post is licensed under CC BY 4.0 by the author.