1

for some reason I want to install gmpy2 on my python(version 3.6.0), I tried it on pycharm. enter image description here

and it gives me an error message like below: enter image description here

(i have already installed pip), anyone help me out? thx!

Tony Chen
  • 183
  • 1
  • 16

1 Answers1

1

Usually this sort of problem (missing header files) is related to not installing the base code package that the python code is wrapping. I don't know gmp, but I would try the suggestion here:

Where to find “gmp.h”?

Community
  • 1
  • 1
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
  • 1
    In addition to the `gmp`, you will also need to install the `mpfr` and `mpc` libraries. Since `mpc` requires `gmp` and `mpfr`, it is usually sufficient to just install `mpc`. Note: I maintain `gmpy2` but I'm not familiar with OSX. – casevh Jan 01 '17 at 05:22
  • Yeah I installed gmp.h using home-brew, but it's still not working, I think maybe because the gmp.h installed on my another python version -- the mac default version 2.7.x? – Tony Chen Jan 01 '17 at 21:38
  • Can you open an issue at https://github.com/aleaxit/gmpy ? I'm happy to help you troubleshoot but I think an actual issue is better suited than StackOverflow. Once we have a procedure, I'll add an answer. – casevh Jan 02 '17 at 07:07