Skip to content

Instantly share code, notes, and snippets.

@Overdrivr
Created March 25, 2019 08:27
Show Gist options
  • Save Overdrivr/325f3c1cfc2950287bc2f582c9b4dda9 to your computer and use it in GitHub Desktop.
Save Overdrivr/325f3c1cfc2950287bc2f582c9b4dda9 to your computer and use it in GitHub Desktop.
Check Microsoft Visual C++ redist. is properly installed for Tensorflow
from ctypes.util import find_library
import ctypes
msvcp140_path = find_library("msvcp140.dll")
if msvcp140_path is None:
raise Exception('msvcp140.dll not found on system')
# Check DLL is found in system32 folder and not somewhere else
print(msvcp140_path)
# Check DLL can be loaded
ctypes.WinDLL("msvcp140.dll")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment