Pycrypto install fatal error: gmp.h file not found

前端 未结 5 1333
抹茶落季
抹茶落季 2021-01-31 07:43

It seems like there are a number of people who have had a similar problem, however, after much searching I haven\'t been able to find a solution that works with my particular ar

5条回答
  •  孤城傲影
    2021-01-31 08:41

    Here is the fix that worked for me:

    https://medium.com/software-bugs/84afab886a1e

    You need to create a symlink based on the installation header include path (-I) in but crash. Example:

    building 'Crypto.PublicKey._fastmath' extension

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -march=native -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include -Wno-unused-value -Wno-empty-body -Qunused-arguments -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ *-I/usr/include/ -*I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_fastmath.c -o build/temp.macosx-10.7-x86_64-2.7/src/_fastmath.o

    src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found

提交回复
热议问题