'错误:安装pythonfcl时命令'gcc'失败,退出状态为'1'

2024-05-13 02:31:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在安装完所有必备组件后pip3 installpython-fcl

但每次我都会收到以下错误消息:

Installing collected packages: python-fcl
Running setup.py install for python-fcl ... error
ERROR: Command errored out with exit status 1:
 command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-install-ztdk03wt/python-fcl_898f6f205407433c8edb2de3ddd6c8cd/setup.py'"'"'; __file__='"'"'/private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-install-ztdk03wt/python-fcl_898f6f205407433c8edb2de3ddd6c8cd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-record-az5xic3w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/python-fcl
     cwd: /private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-install-ztdk03wt/python-fcl_898f6f205407433c8edb2de3ddd6c8cd/
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/fcl
copying fcl/collision_data.py -> build/lib.macosx-10.9-x86_64-3.8/fcl
copying fcl/version.py -> build/lib.macosx-10.9-x86_64-3.8/fcl
copying fcl/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/fcl
running build_ext
cythoning fcl/fcl.pyx to fcl/fcl.cpp
building 'fcl.fcl' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/fcl
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/include -I/usr/local/include -I/usr/include/eigen3 -I/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c fcl/fcl.cpp -o build/temp.macosx-10.9-x86_64-3.8/fcl/fcl.o -std=c++11
In file included from fcl/fcl.cpp:631:
In file included from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
 ^
fcl/fcl.cpp:656:10: fatal error: 'fcl/data_types.h' file not found
#include "fcl/data_types.h"
         ^~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-install-ztdk03wt/python-fcl_898f6f205407433c8edb2de3ddd6c8cd/setup.py'"'"'; __file__='"'"'/private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-install-ztdk03wt/python-fcl_898f6f205407433c8edb2de3ddd6c8cd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/n4/tf_wp68d6lv0xf_4js8_5_kc0000gn/T/pip-record-az5xic3w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/python-fcl Check the logs for full command output.

由于其他人似乎在其他与python fcl无关的情况下也会遇到错误command 'gcc' failed with exit status 1,我猜这是我在python安装中设置的错误。但我不知道怎样才能解决它


Tags: installpybuildnumpyincludeliblibraryframework