错误:命令“clang”失败,退出状态为1

643ylb08  于 2021-08-25  发布在  Java
关注(0)|答案(0)|浏览(221)

我不熟悉编码。使用安装py sphviewer时遇到以下错误 pip install py-sphviewer . 如果我在计算机上的主环境中运行该命令,它会正常工作并安装,但在pycharm的venv中,它会给我这个错误。我怎样才能解决它?谢谢

ERROR: Command errored out with exit status 1:
     command: /Users/user/PycharmProjects/project/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-install-o60muxsn/py-sphviewer_f01b446b8415437295e5f4c739f1548b/setup.py'"'"'; __file__='"'"'/private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-install-o60muxsn/py-sphviewer_f01b446b8415437295e5f4c739f1548b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-record-eniiwsv3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/user/PycharmProjects/project/venv/include/site/python3.8/py-sphviewer
         cwd: /private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-install-o60muxsn/py-sphviewer_f01b446b8415437295e5f4c739f1548b/
    Complete output (40 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14.6-x86_64-3.8
    creating build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/version.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/Render.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/Scene.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/Particles.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/Camera.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    creating build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/extensions
    copying sphviewer/extensions/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/extensions
    creating build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/Blend.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/hsv_tools.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/QuickView.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/camera_tools.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/tools/cmaps.py -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/tools
    copying sphviewer/extra_code.c -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/c_code.c -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    copying sphviewer/README.txt -> build/lib.macosx-10.14.6-x86_64-3.8/sphviewer
    running build_ext
    creating var
    creating var/folders
    creating var/folders/1j
    creating var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn
    creating var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Users/user/PycharmProjects/project/venv/lib/python3.8/site-packages/numpy/core/include -I/Users/user/PycharmProjects/project/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c /var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/tmpromdrtgo.c -o var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/tmpromdrtgo.o -fopenmp
    building 'sphviewer/extensions/scene' extension
    creating build/temp.macosx-10.14.6-x86_64-3.8
    creating build/temp.macosx-10.14.6-x86_64-3.8/sphviewer
    creating build/temp.macosx-10.14.6-x86_64-3.8/sphviewer/extensions
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Users/user/PycharmProjects/project/venv/lib/python3.8/site-packages/numpy/core/include -I/Users/user/PycharmProjects/project/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c sphviewer/extensions/scenemodule.c -o build/temp.macosx-10.14.6-x86_64-3.8/sphviewer/extensions/scenemodule.o -std=c99 -w -ffast-math -I/Users/user/PycharmProjects/project/venv/lib/python3.8/site-packages/numpy/core/include -fopenmp
    clang -bundle -undefined dynamic_lookup -Wl,-headerpad,0x1000 -arch arm64 -arch x86_64 build/temp.macosx-10.14.6-x86_64-3.8/sphviewer/extensions/scenemodule.o -o build/lib.macosx-10.14.6-x86_64-3.8/sphviewer/extensions/scene.cpython-38-darwin.so -lgomp
    ld: library not found for -lgomp
    clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'clang' failed with exit status 1
    ----------------------------------------

ERROR: Command errored out with exit status 1: /Users/user/PycharmProjects/project/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-install-o60muxsn/py-sphviewer_f01b446b8415437295e5f4c739f1548b/setup.py'"'"'; __file__='"'"'/private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-install-o60muxsn/py-sphviewer_f01b446b8415437295e5f4c739f1548b/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/1j/lzpq2tl51gbdxr6nbkpwsjt00000gn/T/pip-record-eniiwsv3/install-record.txt
--single-version-externally-managed --compile --install-headers /Users/user/PycharmProjects/project/venv/include/site/python3.8/py-sphviewer Check the logs for full command output.

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题