gp icon indicating copy to clipboard operation
gp copied to clipboard

How to install libigl on mac m1?

Open TongYiyi11 opened this issue 3 years ago • 6 comments

Hi Professor,

I have a problem installing the igl library on my mac m1. The conda install does not work and I tried to compile the bindings from scratch but there are still errors. I found similar issue in https://github.com/libigl/libigl/issues/1686 and someone metioned using header only mode but I am still confused about how to do it.

Is there any way to solve the problem in detail?

TongYiyi11 avatar Jan 31 '22 05:01 TongYiyi11

I need to look into this, I will get back to you in a few days.

danielepanozzo avatar Jan 31 '22 13:01 danielepanozzo

This is the PR that will add support for the libigl conda package to M1 ARM, it will be merged as soon as it passes the builds: https://github.com/conda-forge/igl-feedstock/pull/27

danielepanozzo avatar Feb 01 '22 19:02 danielepanozzo

As none of the python igl developers as direct access to an M1 mac, this is taking longer than expected to fix with a native build.

As a temporary workaround, could you try the following and let me know if it works: https://conda-forge.org/docs/user/tipsandtricks.html . The slowdown due to rosetta emulation will not be an issue for the assigments.

These are commands to set up an intel conda installation.

CONDA_SUBDIR=osx-64 conda create -n your_environment_name python # Create a new environment called your_environment_name with intel packages. conda activate your_environment_name conda env config vars set CONDA_SUBDIR=osx-64 # Make sure that conda commands in this environment use intel packages. conda deactivate conda activate your_environment_name

danielepanozzo avatar Feb 02 '22 03:02 danielepanozzo

Thank you professor. I successfully install the libgl package following the commands. And I am still wondering if it only affects the speed performance in this way.

TongYiyi11 avatar Feb 02 '22 15:02 TongYiyi11

Great to hear. Yes I think this should only affect performances, but I doubt it will be noticeable. I will post here as soon as the native M1 version will be available on conda.

danielepanozzo avatar Feb 02 '22 15:02 danielepanozzo

If anyone has the similar problem, pls first check your python version. I have done all of these then found igl only supports python version<=3.9, so have to do all the mess again.

Adora2401 avatar Feb 02 '22 19:02 Adora2401