# pipenv install 로 설치중 pycrypto 에서 다음과 같은 에러가 발생했다.
[pipenv.exceptions.InstallError]: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -fwrapv -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/Users/ysoftman/.local/share/virtualenvs/ysoftman-kMySlf5j/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_fastmath.c -o build/temp.macosx-12-x86_64-3.9/src/_fastmath.o
[pipenv.exceptions.InstallError]: src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found
[pipenv.exceptions.InstallError]: # include <gmp.h>
[pipenv.exceptions.InstallError]: ^~~~~~~
[pipenv.exceptions.InstallError]: 1 error generated.
[pipenv.exceptions.InstallError]: error: command '/usr/bin/clang' failed with exit code 1
[pipenv.exceptions.InstallError]: [end of output]
# brew reinstall gmp 를 다시 설치해 봤지만 해결되지 않았다.
# pip install --no-cache pycrypto 도 에러가 발생한다.
# 다음 환경 변수를 주면 설치된다.
# pip 로 설치시
env "CFLAGS=-I/usr/local/include -L/usr/local/lib" pip install --no-cache pycrypto
# pipevn 로 설치시
env "CFLAGS=-I/usr/local/include -L/usr/local/lib" pip install pycrypto
# 환경변수로 한번만 등록해도 된다.
export "CFLAGS=-I/usr/local/include -L/usr/local/lib"
pip install pycrypto
comments:
댓글 쓰기