TroubleChute Logo
VISUAL STUDIO

Install Microsoft C++ Build Tools


Published: Jun 4, 2023
Last Edit: Jun 5, 2023
Visual Studio
415 Words, 2 Minutes.

Build Tools

This may seem simple to install, and it is… But it’s a few steps.

IMPORTANT: If you already have Visual Studio installed

If you already have the Visual Studio Installer installed, you need to open it and select Desktop development with C++ from the main menu, like in option 2 below. You won’t be able to run the one-line installer to get it to install properly. You may be left with duplicate files if you do.

Just select that option and choose Install.

OPTION 1: Auto-install BuildTools

Automatic one-line install command that does it all:

1
iex (irm buildtools.tc.ht)

This needs to be run in an administrative PowerShell window. It will do all of the below automatically for you. If you like these one-line install scripts please consider supporting my work.

Alternatively, you can manually do all the above script does for you:

Instead of a manual download and install, run the following (Assuming you have Chocolatey installed):

To install just Build Tools, run: choco install visualstudio2022buildtools

To install Build Tools and the C++ SDK (What you want to fix Python errors), run:

1
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --quiet" -y

That’s it. You’re done.

OPTION 2: Manual install

Download Build Tools

This is the Visual Studio installer. Visual Studio won’t be installed - Just Build Tools.

Click the “Download Build Tools” button. Open this file when it’s done downloading.

If the window does not open, start Visual Studio Installer from your start menu under Visual Studio.

If you launched it from the Start Menu, you’ll need to select Modify next to Visual Studio Build Tools.

Click Modify

Install Build Tools

Click Continue when prompted about getting started, and wait to reach the main menu. Wait for the small download to complete.

Continue

Select Desktop development with C++ from the install list

Select Desktop development with C++

Then click Install in the bottom right.

Click Install

After the download is complete, the Python errors you’re recieving should be gone.

A large download for Python packages may be unexpected… But unfortunately it’s required for some of them.

At this point you may need to restart your Terminal, Command Prompt or PowerShell window for Python to see the change, but it’s likely unnessecary.

A lot of sources tell you to install buildtools via Python/pip. This is likely not going to help, but if you’re still facing issues installing certain packages:

1
2
python -m pip install setuptools --upgrade
python -m pip install buildtools --upgrade
TroubleChute © Wesley Pyburn (TroubleChute)
Support Me Privacy Policy Cookies Policy Terms of Service Change privacy settings Contact