Skip to content

Instantly share code, notes, and snippets.

@aljbri
Created September 21, 2020 16:39
Show Gist options
  • Save aljbri/d129e07a72f572aec6eaf9680b6d5f59 to your computer and use it in GitHub Desktop.
Save aljbri/d129e07a72f572aec6eaf9680b6d5f59 to your computer and use it in GitHub Desktop.
Microsoft Visual C++ 14.0 Build Tools

What is it about?

Sometimes while installing a new packages in Python we may get the following error:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

In this tiny note, you can get the direct installer for the Microsoft Visual C++ Build Tools 14.0 and you can make an offline installer. Therefore, you can use it on a different computer

Before do anything, install or upgrade the Setuptools Python package. It contain compatibility improvements and add automatic use of compilers [source]

pip install --upgrade setuptools

link

To get the the C++ Build Tools you can get it dircetly from Microsoft throught the provided links:

  • Microsoft Visual C++ 14.0 Build Tools which comes with Microsoft Visual Studio 2015 Download Link

To create an offline installation layout

  1. After you download the installer to a location on your file system, run "visualcppbuildtools_full.exe /layout". For example, run:
visualcppbuildtools_full.exe /layout D:\VisualCppBuildTools_Full_14.0

By using the /layout switch, you can download almost all the installation packages, not just the ones that apply to the download machine. This approach gives you the files that you need to run this installer anywhere and it might be useful if you want to install components that weren't installed originally.

  1. After you run this command, a dialog box will appear that allows you to change the folder where you want the offline installation layout to reside. Next, click the Download button.

  2. When the package download is successful, you should see a message that says Setup Successful! All specified components have been acquired successfully.

Create an Offline Installation of Visual Studio

@Dr-Insanity
Copy link

Installer misses components. Not able to acquire with the listed options! Setup file unusable! Conclusion: Gist not helpful. Update requested.

@bogdanfeodot
Copy link

Same, cannot download via layout. Error of missing components.

@aljbri
Copy link
Author

aljbri commented Apr 15, 2022

@Dr-Insanity @bogdanfeodot : I apologize for the late reply, Microsoft has stopped supporting this version. you can use the last version of "Microsoft Visual C++ Build Tools" which includes all the previous editions.

@Jaighalor
Copy link

Just in case anyone else stumbles across this thread: I had success by downloading the current VS Build Tools installer from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022 and running the application from the terminal with --layout instead of /layout as a parameter. Copied the downloaded files over to my offline workstation and then installed the actual C++ build tools and Windows 10 SDK via the VS installer. Python packages with this dependency now work fine :)

@RakeshChowdhury
Copy link

url updated to https://visualstudio.microsoft.com/visual-cpp-build-tools/

vs_BuildTools.exe --layout .\VisualCppBuildTools_Full

@socarrandinn
Copy link

buenas tarde
existe alguna actualizacion de la aplicacion

@aljbri
Copy link
Author

aljbri commented Jan 26, 2024

@Jaighalor @RakeshChowdhury thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment