SerpentAI / D3DShot

Extremely fast and robust screen capture on Windows with the Desktop Duplication API
MIT License
323 stars 73 forks source link

[WinError 126] The specified module could not be found (shcore) #16

Closed shrddr closed 4 years ago

shrddr commented 4 years ago

Windows 7 Python 3.7 64bit pip install d3dshot

Collecting d3dshot
  Using cached https://files.pythonhosted.org/packages/e8/8d/64838f60f2a3b080024b9774673148020ec2893398c0d1ca41f12d6439f6/D3DShot-0.1.3-py3-none-any.whl
Requirement already satisfied: Pillow>=5.0.0 in ...\lib\site-packages (from d3dshot) (5.2.0)
Requirement already satisfied: comtypes>=1.1.5 in ...\lib\site-packages (from d3dshot) (1.1.7)
Installing collected packages: d3dshot
Successfully installed d3dshot-0.1.3

When running samples from Readme.md:

  File ".test.py", line 3, in <module>
    d = d3dshot.create()
  File "...\lib\site-packages\d3dshot\__init__.py", line 70, in create
    pytorch_gpu_is_available=pytorch_gpu_is_available
  File "...\lib\site-packages\d3dshot\d3dshot.py", line 24, in __init__
    self.detect_displays()
  File "...\lib\site-packages\d3dshot\d3dshot.py", line 194, in detect_displays
    self.displays = Display.discover_displays()
  File "...\lib\site-packages\d3dshot\display.py", line 107, in discover_displays
    scale_factor = d3dshot.dll.shcore.get_scale_factor_for_monitor(hmonitor)
  File "...\lib\site-packages\d3dshot\dll\shcore.py", line 7, in get_scale_factor_for_monitor
    ctypes.windll.shcore.GetScaleFactorForMonitor(hmonitor, ctypes.byref(scale_factor))
  File "...\lib\ctypes\__init__.py", line 426, in __getattr__
    dll = self._dlltype(name)
  File "...\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

The self._name is "shcore" when the exception is raised

shrddr commented 4 years ago

okay I'm dumb Win7 is not supported