python under macosX: Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed

Viewed 1352

MacOS Mojave 10.14.6 Python unter Thonny

Testing pygame zero results in:

%Run intro.py

Traceback (most recent call last):
  File "/Users/sure/Documents/Programmieren/pgzblaster01-master/intro.py", line 1, in <module>
    import pgzrun
  File "/Users/sure/Library/Python/3.7/lib/python/site-packages/pgzrun.py", line 13, in <module>
    from pgzero.runner import prepare_mod, run_mod
  File "/Users/sure/Library/Python/3.7/lib/python/site-packages/pgzero/runner.py", line 1, in <module>
    import pygame
  File "/Users/sure/Library/Python/3.7/lib/python/site-packages/pygame/__init__.py", line 120, in <module>
    from pygame.base import *
ImportError: dlopen(/Users/sure/Library/Python/3.7/lib/python/site-packages/pygame/base.cpython-37m-darwin.so, 2): no suitable image found.  Did find:
    /Users/sure/Library/Python/3.7/lib/python/site-packages/pygame/base.cpython-37m-darwin.so: code signature in (/Users/sure/Library/Python/3.7/lib/python/site-packages/pygame/base.cpython-37m-darwin.so) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
1 Answers

What Helped Me Was To Include the Following Key In My Entitlements File (entitlements.mac.plist):

"com.apple.security.cs.disable-library-validation"

Hope This Helps :D.

Related