Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
177 views
in Technique[技术] by (71.8m points)

python - image not found- when I import the pygame module, it shows an error saying "image not found"

I am having a problem on importing the pygame module

import pygame
Virus:X:O gb$  cd /Users/IMarlisaMalenda/Desktop/Gavela/Python/Games/X:O ; /usr/bin/env /usr/local/bin/python3 /Users/IMarlisaMalenda/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/launcher 53096 -- /Users/IMarlisaMalenda/Desktop/Gavela/Python/Games/X:O/Chess.py 
Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
   return _run_code(code, main_globals, None,
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
   exec(code, run_globals)
 File "/Users/IMarlisaMalenda/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
   cli.main()
 File "/Users/IMarlisaMalenda/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
   run()
 File "/Users/IMarlisaMalenda/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
   runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 265, in run_path
   return _run_module_code(code, init_globals, run_name,
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 97, in _run_module_code
   _run_code(code, mod_globals, init_globals,
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
   exec(code, run_globals)
 File "/Users/IMarlisaMalenda/Desktop/Gavela/Python/Games/X:O/Chess.py", line 1, in <module>
   import pygame
 File "/Users/IMarlisaMalenda/Library/Python/3.8/lib/python/site-packages/pygame/__init__.py", line 81, in <module>
   from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import]
ImportError: dlopen(/Users/IMarlisaMalenda/Library/Python/3.8/lib/python/site-packages/pygame/base.cpython-38-darwin.so, 2): Library not loaded: /System/Library/Frameworks/Metal.framework/Versions/A/Metal
 Referenced from: /Users/IMarlisaMalenda/Library/Python/3.8/lib/python/site-packages/pygame/base.cpython-38-darwin.so
 Reason: image not found
Virus:X:O gb$ pip install pygame 
Requirement already satisfied: pygame in /Users/IMarlisaMalenda/Library/Python/3.8/lib/python/site-packages (2.0.1)
question from:https://stackoverflow.com/questions/66045410/image-not-found-when-i-import-the-pygame-module-it-shows-an-error-saying-imag

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...