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:
|
|
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:
|
|
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
.
Install Build Tools
Click Continue
when prompted about getting started, and wait to reach the main menu. Wait for the small download to complete.
Select Desktop development with C++
from the install list
Then click Install in the bottom right.
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.
Related
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:
|
|