GBillotey / Fractalshades

Arbitrary-precision fractal explorer - Python package
MIT License
28 stars 5 forks source link

Unable to run in Mac M1 #123

Closed biraj094 closed 1 year ago

biraj094 commented 1 year ago

So, I am having an issue running the project on M1 Mac.

The error is as follows:

      #warning "Using deprecated NumPy API, disable it with " \
       ^
      src/fractalshades/mpmath_utils/FP_loop.c:790:10: fatal error: 'gmp.h' file not found
      #include "gmp.h"
               ^~~~~~~
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fractalshades
Failed to build fractalshades
ERROR: Could not build wheels for fractalshades, which is required to install pyproject.toml-based projects

I tried to look into the issue and found a similar solution for missing gmp.h here at https://github.com/OpenZeppelin/nile/issues/22

However, the error still persists. I tried all the solutions mentioned, but am having issues running them.

GBillotey commented 1 year ago

Hi Biraj,

Unfortunately, currently only Linux & Mac OS are supported (mainly because, I only have access to those systems...)

To install on MAC you will need to install from source as I do not ship pre-built binaries, and a pre-requisite is to have recent versions of GMP, MPFR and MPC multi-precision arithmetic libraries installed on your system. I do not use Mac so I cannot help much more, if you manage to install I can only update the installation instruction I guess. This SO question might help: https://stackoverflow.com/questions/35360885/installing-finding-gmp-under-osx

I will keep this issue open for a while in case someone else can support.

biraj094 commented 1 year ago

Thank you! Will try a few things.

biraj094 commented 1 year ago

Hey @GBillotey. The issue is fixed. Thankyou for pointing me in the right direction. Have sent a PR. Please review! https://github.com/GBillotey/Fractalshades/pull/124

GBillotey commented 1 year ago

@biraj094 Thanks a lot for your feedback, I have merged #124 and will rebuild the doc soon. You are the first 'external' contributor to this package !