MacOS Mojave 10.14.6Python unter Thonny
测试pygame zero的结果是:
%运行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.发布于 2020-06-15 04:22:33
帮助我的是在我的权利文件(entitlements.mac.plist)中包含了以下密钥:
"com.apple.security.cs.disable-library-validation“
希望这能有所帮助:D。
https://stackoverflow.com/questions/60351099
复制相似问题