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.
NOTE: Chocolatey is for Windows computers only!
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
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.
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!
Now that you have Chocolatey installed, you can use it to install other programs easily!
choco search python
choco install python(Always run this as administrator!)
choco upgrade python
choco list --local-only
choco uninstall python
Important: Chocolatey commands need administrator privileges to work. Always open PowerShell as administrator before using Chocolatey!
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
Now that you have Chocolatey installed, you can: