To install Microsoft Visual C++ 14.0 offline requires a few steps. This was part of the process for getting SQL Server 2017 with Machine Learning / Python running at work.
- Download the Build Tools executable from the network installation page.
- Set up a folder on a drive where you have a good amount of space free. Microsoft notes that a complete install requires at least 35 GB (Gigabytes) of space available, and in my experience I needed close to 20 GB.
- Run the executable from the command line with additional arguments. The ones I used were:
c:\temp\vs_buildtools.exe --layout d:\vs2017offline --add Microsoft.VisualStudio.Workload.VCTools --lang en-US. To learn more about what these arguments are, check out Customizing the network layout.
- Once everything is downloaded, copy the folder over to the device it's to be installed on. I'm not sure if it matters, but I kept the
layoutfolder path the same between the two devices.
- Normally certificates would be installed as part of a normal installation. However in this case, there are certificates that will need to be installed by hand or script as described by Microsoft. These are located in the
layoutfolder, which for me was
d:\vs2017offline\certificates. I double clicked and each certificate for the entire machine rather than for an individual user.
- Once the certificates are installed, the Offline Installation guide mentions running another script to install it on the local machine. I ran into issues getting this working, and so I just ran the executable from the
layoutfolder and only installed the Build Tools that I had downloaded before. When checking the options, I turned on the mandatory content, and then the VC 14 build tools. This process took FAR longer than I expected, and had assumed it had either crashed or was trying to go out to the network. But until it actually gave me network errors, it just seems to take a while to complete.
Once the Build Tools were installed, I had to also modify my
pip.ini to connect to a local python package repository. To change the location, I created a new
pip.ini file with something similar to the link above that looked like:
[global] index-url = https://localhost:8443/repository/pypi-all/simple. Once I created the file, to have it picked up, I followed this Stack Overflow post and created the file in
Finally, after everything was set up, I was able to run pip installer from python folder in SQL Server and install new packages.