screenshot icon indicating copy to clipboard operation
screenshot copied to clipboard

Wrong version of PyObjC C API

Open Keou0007 opened this issue 2 years ago • 0 comments

Just tried to install and run, got this error.

shannon$ pip install screenshot
Collecting screenshot
  Downloading screenshot-1.0.0-py3-none-any.whl (5.3 kB)
Requirement already satisfied: pyobjc-framework-Quartz in ./opt/miniconda3/lib/python3.8/site-packages (from screenshot) (7.3)
Requirement already satisfied: click in ./opt/miniconda3/lib/python3.8/site-packages (from screenshot) (8.1.3)
Requirement already satisfied: pyobjc-core>=7.3 in ./opt/miniconda3/lib/python3.8/site-packages (from pyobjc-framework-Quartz->screenshot) (8.5)
Requirement already satisfied: pyobjc-framework-Cocoa>=7.3 in ./opt/miniconda3/lib/python3.8/site-packages (from pyobjc-framework-Quartz->screenshot) (8.5)
Installing collected packages: screenshot
Successfully installed screenshot-1.0.0
shannon$ screenshot -h
Traceback (most recent call last):
  File "/Users/shannon/opt/miniconda3/bin/screenshot", line 5, in <module>
    from screenshot.screencapture import run
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/screenshot/screencapture.py", line 9, in <module>
    from .get_window_id import gen_window_ids, WINDOW_OPTIONS, USER_OPTS_STR
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/screenshot/get_window_id.py", line 4, in <module>
    from Quartz import CGWindowListCopyWindowInfo, kCGWindowListExcludeDesktopElements, kCGNullWindowID, \
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/Quartz/__init__.py", line 110, in <module>
    _load()
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/Quartz/__init__.py", line 28, in _load
    from Quartz import CoreGraphics as m
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/Quartz/CoreGraphics/__init__.py", line 147, in <module>
    _load(mod)
  File "/Users/shannon/opt/miniconda3/lib/python3.8/site-packages/Quartz/CoreGraphics/__init__.py", line 55, in _load
    import Quartz.CoreGraphics._callbacks as m
RuntimeError: Wrong version of PyObjC C API (got 23, expected 21)

Keou0007 avatar Jul 10 '22 09:07 Keou0007