我正在尝试安装 pymunk,但这样做pip install pymunk
会给我一个错误。README 文件在安装时这样说:
在正常情况下,pymunk 可以使用 pip 安装:
> pip install pymunk
它有一个直接依赖项,CFFI。
Pymunk 也可以使用 conda 安装,来自 conda-forge 频道:
> conda install -c conda-forge pymunk
这是我得到的错误:
Collecting pymunk
Using cached pymunk-5.6.0.zip (5.5 MB)
Requirement already satisfied: cffi!=1.13.1 in c:\users\emmsch001\appdata\local\programs\python\python37\lib\site-packages (from pymunk) (1.13.2)
Requirement already satisfied: pycparser in c:\users\emmsch001\appdata\local\programs\python\python37\lib\site-packages (from cffi!=1.13.1->pymunk) (2.19)
Building wheels for collected packages: pymunk
Building wheel for pymunk (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\emmsch001\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"'; __file__='"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\EMMSCH~1\AppData\Local\Temp\pip-wheel-07rt65wo'
cwd: C:\Users\EMMSCH~1\AppData\Local\Temp\pip-install-qebhmk1e\pymunk\
Complete output (61 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pymunk
copying pymunk\arbiter.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\autogeometry.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\bb.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\body.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\collision_handler.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\constraint.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\contact_point_set.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\kivy_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\matplotlib_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\pygame_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\pyglet_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\query_info.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\shapes.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\shape_filter.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\space.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\space_debug_draw_options.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\transform.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\vec2d.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_chipmunk_cffi.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_chipmunk_cffi_abi.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_libload.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_pickle.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\__init__.py -> build\lib.win-amd64-3.7\pymunk
creating build\lib.win-amd64-3.7\pymunkoptions
copying pymunkoptions\__init__.py -> build\lib.win-amd64-3.7\pymunkoptions
creating build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\doctests.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_arbiter.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_autogeometry.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_bb.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_body.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_common.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_constraint.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_shape.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_shape_filter.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_space.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_transform.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_vec2d.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\__init__.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\__main__.py -> build\lib.win-amd64-3.7\pymunk\tests
running egg_info
writing pymunk.egg-info\PKG-INFO
writing dependency_links to pymunk.egg-info\dependency_links.txt
writing requirements to pymunk.egg-info\requires.txt
writing top-level names to pymunk.egg-info\top_level.txt
Running on Windows. GCC will be forced used
reading manifest file 'pymunk.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'examples\.ipynb_checkpoints'
writing manifest file 'pymunk.egg-info\SOURCES.txt'
running build_ext
Could not detect if on Android. Defaulting to false.
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -shared -O3 -m64 -Ichipmunk_src\include -c chipmunk_src\src\chipmunk.c -o chipmunk_src\src\chipmunk.o
error: command 'cc' failed: No such file or directory
----------------------------------------
ERROR: Failed building wheel for pymunk
Running setup.py clean for pymunk
Failed to build pymunk
Installing collected packages: pymunk
Running setup.py install for pymunk ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\emmsch001\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"'; __file__='"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\EMMSCH~1\AppData\Local\Temp\pip-record-0q5_wkzu\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\emmsch001\appdata\local\programs\python\python37\Include\pymunk'
cwd: C:\Users\EMMSCH~1\AppData\Local\Temp\pip-install-qebhmk1e\pymunk\
Complete output (61 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pymunk
copying pymunk\arbiter.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\autogeometry.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\bb.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\body.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\collision_handler.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\constraint.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\contact_point_set.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\kivy_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\matplotlib_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\pygame_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\pyglet_util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\query_info.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\shapes.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\shape_filter.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\space.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\space_debug_draw_options.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\transform.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\util.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\vec2d.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_chipmunk_cffi.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_chipmunk_cffi_abi.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_libload.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\_pickle.py -> build\lib.win-amd64-3.7\pymunk
copying pymunk\__init__.py -> build\lib.win-amd64-3.7\pymunk
creating build\lib.win-amd64-3.7\pymunkoptions
copying pymunkoptions\__init__.py -> build\lib.win-amd64-3.7\pymunkoptions
creating build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\doctests.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_arbiter.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_autogeometry.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_bb.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_body.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_common.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_constraint.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_shape.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_shape_filter.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_space.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_transform.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\test_vec2d.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\__init__.py -> build\lib.win-amd64-3.7\pymunk\tests
copying pymunk\tests\__main__.py -> build\lib.win-amd64-3.7\pymunk\tests
running egg_info
writing pymunk.egg-info\PKG-INFO
writing dependency_links to pymunk.egg-info\dependency_links.txt
writing requirements to pymunk.egg-info\requires.txt
writing top-level names to pymunk.egg-info\top_level.txt
Running on Windows. GCC will be forced used
reading manifest file 'pymunk.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'examples\.ipynb_checkpoints'
writing manifest file 'pymunk.egg-info\SOURCES.txt'
running build_ext
Could not detect if on Android. Defaulting to false.
cc -std=gnu99 -ffast-math -DCHIPMUNK_FFI -g -DCP_USE_CGPOINTS=0 -DNDEBUG -shared -O3 -m64 -Ichipmunk_src\include -c chipmunk_src\src\chipmunk.c -o chipmunk_src\src\chipmunk.o
error: command 'cc' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\emmsch001\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"'; __file__='"'"'C:\\Users\\EMMSCH~1\\AppData\\Local\\Temp\\pip-install-qebhmk1e\\pymunk\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\EMMSCH~1\AppData\Local\Temp\pip-record-0q5_wkzu\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\emmsch001\appdata\local\programs\python\python37\Include\pymunk' Check the logs for full command output.
我该如何解决/解决这个问题?