pyiron/ironflow

Support for Mac M1/M2 architecture

Closed this issue · 5 comments

JNmpi commented

Summary

Detailed Description

Further Information, Files, and Links

JNmpi commented

I tried to install the latest ironflow version on a Mac with M2 chip. I encountered first a problem with owlready2, where there is apparently no ARM-version for this module. While I could overcome this issue installing owlready2 via pip I got an error message when installing pyiron-onthology:

      Could not solve for environment specs
      Encountered problems while solving:
        - nothing provides owlready2 needed by pyiron_ontology-0.1.0-pyhd8ed1ab_0 

I guess the reason is that it looks only for modules installed via condo-forge. Any suggestions/ideas?

I'm not sure, but when pyiron_ontology tries to install itself, I think you are probably correct that it only looks in your current conda env for the requirements. The only (unpleasant) workaround I can think of is to clone the ontology repo and add it to your python path, bypassing its conda install entirely, and installing the dependencies separately (eg as you have done with owlready2 via pip). Once the python code itself is running, as long as the imports exist in your python path it shouldn't care if they got installed by pip or conda.

The owlready2 library has big chunks written in Java, which is outside my expertise, so I doubt I will be able to go make PRs to get it up to date for M2. Is it not possible with M2 to install non-M2 packages in a sort of emulated (and computationally inefficient) way? Short of hoping the owlready2 dev updates things for M2 or finding a totally different ontology library, that's my best hope.

The good thing about Java is that the code is compiled against the java virtual machine (JVM), so it is transferable as long as the JVM is available for the specific architecture. For Apple ARM there is already a JVM so all I had to do for owlready2 is request the Apple ARM migration on the conda-forge side conda-forge/conda-forge-pinning-feedstock#4285 and merge it conda-forge/owlready2-feedstock#33 . Both is done now, so it should be possible to install owlready2 via conda on apple ARM.

JNmpi commented

Hi Jan and Liam, thanks for your help. With the new conda version (thanks Jan) I had no problem and ironflow is working like a charm.

Thanks Jan!!!!