Pycrypto install fatal error: gmp.h file not found

前端 未结 5 1335
抹茶落季
抹茶落季 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:23

    If you use Homebrew, this should do the trick:

    brew install gmp
    env "CFLAGS=-I/usr/local/include -L/usr/local/lib" pip install pycrypto
    

    Using env will only make it work for that invocation. If you need to install pycrypto at a later time in this session export the variable instead.

    export "CFLAGS=-I/usr/local/include -L/usr/local/lib" 
    pip install pycrypto
    

提交回复
热议问题