安装pygame后如何处理“没有名为pygame的模块”?

乔希

我正在运行python3.8,并且在.py文件中具有“ import pygame”,并且它说,当我运行它时,“ ModuleNotFoundError:没有名为“ pygame”的模块”,但是在终端上,我输入了“ python -m pip install- -user pygame”,并说:“已经满足要求:.​​/ Library / Python / 2.7 / lib / python / site-packages(1.9.6)中的pygame。”

现在,它说的是python 2.7,但是当我运行并运行python3.8的“ pip install pygame”时,它抛出了一个错误:

正在运行pygame的setup.py install ...错误错误:命令错误,退出状态为1:命令:/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c'import sys,setuptools ,标记化;sys.argv [0] ='“'”'/private/var/folders/g9/77451rtd0vj7grc2_lz66tc80000gn/T/pip-install-2uujwl1k/pygame/setup.py'“'”'; 文件='“'”'/ private / var / folders / g9 / 77451rtd0vj7grc2_lz66tc80000gn / T / pip-install-2uujwl1k / pygame / setup.py'“'”'; f = getattr(tokenize,'“'”'open' “'”',打开)(file); code = f.read()。replace('“'”'\ r \ n'“'”','“'”'\ n'“'”')); f.close(); exec(编译(代码,文件,'“'”'exec'“'”''')))'安装--record /private/var/folders/g9/77451rtd0vj7grc2_lz66tc80000gn/T/pip-record-ceom_msx/install-record.txt-外部单独转换-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pygame cwd:/ private / var / folders / g9 / 77451rtd0vj7grc2_lz66tc80000gn / T / pip-install-2uujwl1k / pygame /完整输出(213行):运行安装运行构建运行build_py创建构建创建build / lib.macosx-10.9-x86_64-3.8创建build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / surfarray.py -> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / sysfont.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / _camera_vidcapture.py-> build / lib.macosx- 10.9-x86_64-3.8 / pygame复制src_py / sndarray.py->build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / version.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / compat.py-> build / lib.macosx-10.9- x86_64-3.8 / pygame复制src_py / draw_py.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / colordict.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / ftfont.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / midi.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / cursors.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame复制src_py /macosx-10.9-x86_64-3.8 / pygame复制src_py / ftfont.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / midi.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / cursors.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py /macosx-10.9-x86_64-3.8 / pygame复制src_py / ftfont.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / midi.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / cursors.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py /初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / _numpysndarray.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / sprite.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame复制src_py / macosx.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / _numpysurfarray.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / camera.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / freetype.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / _camera_opencv_highgui.py -> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / pkgdata.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame复制src_py / locals.py-> build / lib.macosx- 10.9-x86_64-3.8 / pygame复制src_py /dummybackend.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame创建build / lib.macosx-10.9-x86_64-3.8 / pygame /复制src_py / threads / Py25Queue.py的线程-> build / lib.macosx- 10.9-x86_64-3.8 / pygame /线程复制src_py / threads / init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / threads创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / base_test.py-> build / lib.macosx-10.9 -x86_64-3.8 / pygame / tests复制test / font_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mixer_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / rwobject_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / pixelcopy_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / overlay_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / scrap_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / touch_tags .py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / imageext_tags.py-> build / lib.macosx-10.9-x86_64-3。8 / pygame /测试复制test / pixelarray_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / draw_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / transform_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / blit_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制测试/ bufferproxy_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / surfarray_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mouse_test.py- > build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / surfarray_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / event_test.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame / tests复制test / imageext_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / sprite_test。py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / touch_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / gfxdraw_test.py-> build /lib.macosx-10.9-x86_64-3.8/pygame/tests复制test / rect_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / scrap_tags.py-> build / lib.macosx -10.9-x86_64-3.8 / pygame / tests复制测试/在里面.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / overlay_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / color_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / camera_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / surflock_test.py-> build / lib。 macosx-10.9-x86_64-3.8 / pygame / tests复制test / key_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / sysfont_test.py-> build / lib.macosx-10.9- x86_64-3.8 / pygame / tests复制test / font_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mixer_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / constants_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mixer_music_tags.py-> build / lib.macosx-10.9-x86_64-3。8 / pygame /测试复制test / sndarray_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / image_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / version_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / freetype_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制测试/ joystick_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / midi_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / ftfont_tags.py- > build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / image__save_gl_surface_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / cdrom_tags.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame / tests复制test / cursors_test.py-> build / lib.macosx-10.9-x86_64-3。8 / pygame /测试复制test / fastevent_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / display_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / fastevent_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试复制test / compat_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制测试/ ftfont_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制测试test / cdrom_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mask_test.py- > build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / midi_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / freetype_tags.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame / tests复制test / math_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / time_test.py-> build / lib。macosx-10.9-x86_64-3.8 / pygame / tests复制test / image_tags.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / threads_test.py-> build / lib.macosx-10.9- x86_64-3.8 / pygame / tests复制测试/主要.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / mixer_music_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / sndarray_tags.py- > build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / test_test .py- > build / lib.macosx-10.9-x86_64-3.8 / pygame / tests复制test / surface_test.py-> build / lib .macosx-10.9-x86_64-3.8 / pygame / tests创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / run_tests.py-> build / lib.macosx-10.9-x86_64- 3.8 / pygame / tests / test_utils复制test / test_utils / endian.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / test_machinery.py-> build / lib.macosx- 10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制测试/test_utils/png.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制测试/test_utils/test_runner.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / arrinter.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / buftools.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils复制test / test_utils / async_sub.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / test_utils创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests复制test / run_tests__tests / run_tests__test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests复制test / run_tests__tests / init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/ run_tests__tests / all_ok / fake_3_test。 py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/run_tests__tests/all_ok/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/ run_tests__tests / all_ok /初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/run_tests__tests/all_ok/fake_4_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__测试/ all_ok复制测试/run_tests__tests/all_ok/fake_5_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/ run_tests__tests / all_ok / no_assertions__ret_ret。 .macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/run_tests__tests/all_ok/zero_tests_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok复制测试/ run_tests__tests / all_ok / fake_6_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / all_ok创建build / lib.macosx-10.9-x86_64-3。8 / pygame / tests / run_tests__tests / failures1复制测试/run_tests__tests/failures1/fake_3_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / failures1复制测试/ run_ures__pys / failures1复制-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / failures1复制测试/ run_tests__tests / failures1 /初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / failures1复制测试/run_tests__tests/failures1/fake_4_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / failures1创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /不完整复制test / run_tests__tests / incomplete / fake_3_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /不完全复制测试/run_tests__tests/incomplete/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /不完整复制测试/ run_tests__tests / incomplete / init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /未完成创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / infinite_loop复制测试/ run_tests__tests / infinite_loop / fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / infinite_loop复制测试/run_tests__tests/infinite_loop/fake_1_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试/运行测试__测试/无限循环复制测试/运行测试__测试/无限循环/初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / infinite_loop创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stderr复制测试/ run_tests__tests / print_stderr / fake_3_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stderr复制测试/run_tests__tests/print_stderr/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stderr复制test / run_tests__tests / print_stderr / init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stderr复制测试/run_tests__tests/print_stderr/fake_4_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stderr创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stdout复制测试/run_tests__tests/print_stdout/fake_3_test.py-> build / lib.macosx-10.9-x86_64-3.8 /测试/ run_tests__tests / print_stdout复制测试/ run_tests__tests / print_stdout / fake_2_test.py - >构建/ lib.macosx-10.9-x86_64-3.8 / pygame的/测试/ run_tests__tests / print_stdout复制测试/ run_tests__tests / print_stdout /初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stdout复制测试/run_tests__tests/print_stdout/fake_4_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / print_stdout创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / incomplete_todo复制test / run_tests__tests / incomplete_todo / fake_3_test.py-> build / lib.macosx-10.9-x86_64-3.8 /测试/ run_tests__tests / incomplete_todo复制测试/ run_tests__tests / incomplete_todo / fake_2_test.py - >构建/ lib.macosx-10.9-x86_64-3.8 / pygame的/测试/ run_tests__tests / incomplete_todo复制测试/ run_tests__tests / incomplete_todo /初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / incomplete_todo创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /排除复制test / run_tests__tests / exclude / magic_tag_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /排除复制测试/run_tests__tests/exclude/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试/运行测试__测试/排除复制测试/运行测试__测试/排除/初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /排除复制测试/ run_tests__tests /排除/invisible_tag_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /排除创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / timeout copying test / run_tests__tests / timeout / sleep_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试/运行测试__测试/超时复制测试/运行测试__测试/超时/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__测试/超时复制测试/运行测试__测试/超时/初始化.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / timeout创建build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /一切复制测试/ run_tests__tests / everything / sleep_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / everything复制测试/run_tests__tests/everything/magic_tag_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /测试/运行测试__测试/一切复制测试/运行测试__测试/一切/fake_2_test.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__测试/所有复制的测试/ run_tests__测试/所有构建/ py_to- lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests /一切复制测试/ run_tests__tests /一切/ init.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / tests / run_tests__tests / everything创建build / lib.macosx-10.9-x86_64-3.8 / pygame / docs复制docs / init .py- > build / lib .macosx-10.9-x86_64-3.8 / pygame / docs复制docs / main.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / docs创建build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/playmus.py-> build / lib.macosx-10.9 -x86_64-3.8 / pygame / examples复制examples / mask.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制examples / sound.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/overlay.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/aacircle.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/chimp.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/liquid.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/ audiocapture .py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/sound_array_demos.py-> build / lib.macosx-10.9-x86_64-3。8 / pygame / examples复制示例/midi.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/scroll.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /例子复制examples / cursors.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制例子/moveit.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制例子/在里面.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/blit_blends.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/testsprite.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/textinput.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/vgrade.py-> build / lib。 macosx-10.9-x86_64-3.8 / pygame / examples复制示例/arraydemo.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/stars.py-> build / lib.macosx-10.9- x86_64-3.8 / pygame / examples复制示例/camera.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/blend_fill.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/fonty.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/ headless_no_windows_needed。py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/fastevents.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/prevent_display_stretching.py-> build /lib.macosx-10.9-x86_64-3.8/pygame/examples复制示例/glcube.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/aliens.py-> build / lib.macosx -10.9-x86_64-3.8 / pygame / examples复制示例/freetype_misc.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/scaletest.py-> build / lib.macosx-10.9-x86_64 -3.8 / pygame / examples复制示例/video.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/eventlist.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制示例/scrap_clipboard.py-> build / lib.macosx-10.9-x86_64-3。8 / pygame / examples复制示例/oldalien.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples复制example / pixelarray.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame /示例复制examples / dropevent.py-> build / lib.macosx-10.9-x86_64-3.8 / pygame / examples运行build_ext并构建“ pygame.gfxdraw”扩展名,创建build /temp。macosx-10.9-x86_64-3.8创建build / temp。 macosx-10.9-x86_64-3.8 / src_c创建build / temp.macosx-10.9-x86_64-3.8 / src_c / SDL_gfx gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3-墙-arch x86_64 -g -Ddarwin -D_THREAD_SAFE -DENABLE_NEWBUF = 1 -I / usr / X11R6 / include -I / usr / local / include / SDL -I / Library / Frameworks / Python.framework / Versions / 3.8 / include / python3.8 -c src_c / gfxdraw.c -o build / temp.macosx-10.9-x86_64-3.8 / src_c / gfxdraw.o xcrun:错误:无效的活动开发人员路径(/ Library / Developer / CommandLineTools),缺少xcrun,位于:/ Library / Developer / CommandLineTools / usr / bin / xcrun ---有关编译的帮助,请参见:https://www.pygame.org/wiki/MacCompile要为pygame开发做出贡献,请参见:https : //www.pygame.org/contribute.html ---错误:命令'gcc'失败,退出状态为1 --- -------------------------------------错误:命令错误,退出状态为1:/ Library / Frameworks / Python.framework / Versions / 3.8 / bin / python3.8 -u -c'import sys,setuptools,tokenize; sys.argv [0] ='“'”'/private/var/folders/g9/77451rtd0vj7grc2_lz66tc80000gn/T/pip-install-2uujwl1k/pygame/setup.py'“'”'; 文件='“'”'/ private / var / folders / g9 / 77451rtd0vj7grc2_lz66tc80000gn / T / pip-install-2uujwl1k / pygame / setup.py'“'”'; f = getattr(tokenize,'“'”'open' “'”',,'“'”'exec'“'”''')))'安装--record /private/var/folders/g9/77451rtd0vj7grc2_lz66tc80000gn/T/pip-record-ceom_msx/install-record.txt-外部单独转换-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pygame检查日志以获取完整的命令输出。

有什么帮助吗?

里士

您的Pygame当前下载到的Python版本与您使用的版本不同。您将必须从终端导航到当前的python版本,然后pip安装它。以下链接可以帮助您导航到当前的python版本。如何在Terminal中切换Python版本?

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用 pip 后没有名为“pygame”的模块

没有名为pygame的模块

Pygame已经安装;但是,python终端显示“没有名为'pygame'的模块”(Ubuntu 20.04.1)

Pygame + Pyinstaller = ImportError:没有名为“ pygame”的模块

如何使用Windows二进制安装程序(.msi)在Windows 64BIT上安装pygame(ImportError:没有名为“ pygame”的模块)

Pygame 已安装,但我有一个“导入错误:没有名为“pygame”的模块

ModuleNotFoundError: 没有名为“pygame._freetype”的模块

导入错误:Ubuntu 上没有名为“pygame”的模块

安装后没有名为“ tensorflow_examples”的模块

Jupyter:安装后没有名为“ imblearn”的模块

安装后没有名为“ atari_py”的模块

安装 keras 后没有名为 keras 的模块

安装后没有名为matplotlib的模块

ModuleNotFoundError:pip安装后没有名为“ requests”的模块

安装成功后“没有名为 wordcloud 的模块”

通过pip安装后没有名为“ folium”的模块

ModuleNotFoundError:没有名为“ pygame.locals”的模块;'pygame'不是一个包

ImportError:没有名为处理的模块

我的python程序说“没有名为'pygame_functions'的模块”

从命令提示符 ModuleNotFoundError 运行 python 文件:没有名为“pygame”的模块

ModuleNotFoundError:安装模块后没有名为“ pgzrun”的模块吗?

即使在安装后也出现““ ImportError:没有名为httplib2的模块”

ImportError:安装python-opencv后没有名为opencv的模块

导入 django ModuleNotFoundError:安装 python 2 后没有名为“django”的模块

ImportError:Numpy安装后在Ubuntu上没有名为numpy的模块

Anaconda安装后,conda命令失败,并显示“ ImportError:没有名为conda.cli的模块”

ModuleNotFoundError:安装python 3.7后没有名为“apt_pkg”的模块

在pip安装后没有名为imutils.pespective的模块

安装scipy软件包后,出现“ ImportError:没有名为scipy的模块”