Installing and Using Chocolatey

Back to Home Page


What is Chocolatey?

Chocolatey is a special type of software that programmers call a package manager. Similar to how a postal service worker's job is to handle packages in the mail, a package manager's job is to handle finding and downloading programs onto your computer. They are very helpful, as they perform a lot of the installation steps for you.

In this tutorial, you'll learn how to install and use Chocolatey. I'll guide you through the entire process, and you'll do some cool stuff on the command line! I think Chocolatey is very valuable, but using it is absolutely not a requirement.


Installing Chocolatey

NOTE: Chocolatey is for Windows computers only!

Step 1: Open the Windows Terminal as Administrator

  1. Click on the Windows Start button
  2. Type "Terminal" (if on Windows 10 or below, type "PowerShell")
  3. Right-click on "Terminal" in the search result (as above--if on Windows 10 or below, do this for "PowerShell")
  4. Select "Run as administrator"
  5. Click "Yes" when asked if you want to allow the app to make changes

Step 2: Check Your Execution Policy

Before we install Chocolatey, we need to make sure your PC will allow us to run it. We'll do that using a command! In the Terminal/PowerShell window, type (or paste) the following, and press Enter:

Get-ExecutionPolicy

If it says "Restricted", type (or paste) this command and press Enter:

Set-ExecutionPolicy AllSigned

or

Set-ExecutionPolicy Bypass -Scope Process

Step 3: Install Chocolatey

Copy and paste this whole command into Terminal (or PowerShell), then press Enter:

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'))

Wait for the installation to finish. You'll see a message saying Chocolatey is ready when it's done! Note: To use it, you'll have to repeat Step 1 again.

Step 4: Verify the Installation

To make sure Chocolatey installed correctly, close your PowerShell window and open a new one as administrator. Then type:

choco --version

If you see a version number (like "1.2.0"), then Chocolatey installed successfully!


Using Chocolatey

Now that you have Chocolatey installed, you can use it to install other programs easily!

Basic Commands

Always Run as Administrator

Important: Chocolatey commands need administrator privileges to work. Always open PowerShell as administrator before using Chocolatey!

Saying Yes to Installation

When you install a program, Chocolatey will ask you to confirm. You can type 'Y' and press Enter, or you can add -y to your command to automatically say yes:

choco install python -y

What's Next?

Now that you have Chocolatey installed, you can:


Back to Home Page