libigl-python-bindings icon indicating copy to clipboard operation
libigl-python-bindings copied to clipboard

How to install on osx-arm64?

Open paddyroddy opened this issue 3 years ago • 7 comments

Apologies, I'm aware that this is the last stable version but I just got a new laptop and now cannot install this great library.

Clearly this is related to https://github.com/libigl/libigl/issues/1686. Is there a way and I can make the setup.py use header only mode if I compile from scratch i.e. https://github.com/libigl/libigl/issues/1686#issuecomment-955814180?

paddyroddy avatar Nov 07 '21 18:11 paddyroddy

The error I get after running python setup.py develop is like this image

paddyroddy avatar Nov 07 '21 18:11 paddyroddy

Is that latest merged PR indicates that I can install and use igl-python in M1 mac?

conda install -c conda-forge igl does not work for me now.

EJShim avatar Dec 10 '21 03:12 EJShim

That's what I thought, doesn't seem to work yet. Someone told me about the conda-forge/conda-forge-pinning-feedstock repo

paddyroddy avatar Dec 10 '21 08:12 paddyroddy

For me, now at least, a local installation works i.e. python setup.py develop

paddyroddy avatar Mar 23 '22 17:03 paddyroddy

Thanks for the post! It's very helpful. I just want to add that I think currently in setup.py it's possible to fail to get the correct environment info. https://github.com/libigl/libigl-python-bindings/blob/master/setup.py#L89 I would get errors like:

(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')

I changed this line to tmp = os.getenv("target_platform", "") + platform.machine() and it worked out fine (added the correct cmake flag for osx arch).

merlinyx avatar May 11 '22 23:05 merlinyx

Are there any updates on this on how to install libigl via conda on M1 architecture? igl is not found on the noarch or osx-arm64 conda repo, forcing the install via the osx-64 repo works but then obviously fails when trying to use libigl in python...

rubenwgs avatar May 30 '22 07:05 rubenwgs

That's what I thought, doesn't seem to work yet. Someone told me about the conda-forge/conda-forge-pinning-feedstock repo

So I've now realised that a PR is made here https://github.com/conda-forge/igl-feedstock/pull/27, but looks like it's gone stale. Presumably because there are challenges in actually getting it working

paddyroddy avatar May 30 '22 10:05 paddyroddy

fixed with #164 (use pip install libigl)

alecjacobson avatar Feb 05 '23 23:02 alecjacobson