  import sys
  import platform
  OS_Version = (platform.system(), platform.release())
  Py_Version = (platform.python_version(), platform.architecture()[0])
  LD_LIBRARY_PATH = os.environ.get("LD_LIBRARY_PATH", None)
  IS_ADMIN = False
  IS_VIRTUALENV = False
  CUDA_Version = ""
  ENABLE_DOCKER = True
 
</s> remove import pynvml
 </s> add import platform

if platform.system() == 'Darwin':
    import pynvx
    is_macos = True
else:
    import pynvml
    is_macos = False </s> remove             try:
                pynvml.nvmlInit()
            except pynvml.NVMLError_LibraryNotFound:
                self.initialized = True
                return
 </s> add             if is_macos:
                try:
                    pynvx.cudaInit()
                except RuntimeError:
                    self.initialized = True
                    return
            else:
                try:
                    pynvml.nvmlInit()
                except pynvml.NVMLError_LibraryNotFound:
                    self.initialized = True
                    return </s> remove         try:
            self.device_count = pynvml.nvmlDeviceGetCount()
        except pynvml.NVMLError:
            self.device_count = 0
 </s> add         if is_macos:
            self.device_count = pynvx.cudaDeviceGetCount(ignore=True)
        else:
            try:
                self.device_count = pynvml.nvmlDeviceGetCount()
            except pynvml.NVMLError:
                self.device_count = 0 </s> remove             pynvml.nvmlShutdown()
 </s> add             if not is_macos:
                pynvml.nvmlShutdown()
Is_MacOS = (platform.system() == 'Darwin')
  import sys
  import platform
  OS_Version = (platform.system(), platform.release())
  Py_Version = (platform.python_version(), platform.architecture()[0])
Is_MacOS = (platform.system() == 'Darwin')
  LD_LIBRARY_PATH = os.environ.get("LD_LIBRARY_PATH", None)
  IS_ADMIN = False
  IS_VIRTUALENV = False
  CUDA_Version = ""
  ENABLE_DOCKER = True
keep keep keep add keep keep keep keep keep
 Fixed face extract with dlib on OS X (#510)

* fix: gpu stat for OS X
- Use pynvx to get GPU info on OS X
- fix face extract with dlib

Issue #488 
setup.py