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
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
- 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.
-
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.
-
When the package download is successful, you should see a message that says Setup Successful! All specified components have been acquired successfully.
@Jaighalor @RakeshChowdhury thanks for your contribution.