xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
MIT License
138 stars 68 forks source link

Installation of pylarch on Mac M1 #493

Closed MarcoVando closed 8 months ago

MarcoVando commented 9 months ago

HI I was trying to install larch on a mac M1 but I found some weird things happening and I ended up in a segmentation error once I call the Interpreter()

To install larch I followed the instructions in the following guide (https://xraypy.github.io/xraylarch/installation.html) Although I see the commands to install wxutils, wxmplot and fabio in the instructions, these packages were not installed and I had to rerun the conda install command for each of them. After that I was able to import those packages in the python environment but once I call Larch or the Interpreter I obtain a segmentation fault

>>> my_larch = Interpreter() zsh: segmentation fault python

Is this a known error? Am I missing something? Is it possible to run larch on a M chip?

image
MarcoVando commented 9 months ago

Managed by using the mac installer provided in the guide. This generates an additional miniconda named "xraylarch" Seems that the installed version uses the x86-64 architecture so I guess it runs with Rosetta and the error I specified before was due to some incompatibility of the packages?

newville commented 9 months ago

@MarcoVando Sorry for the delay in responding -- I was traveling the past few weeks.

As it turns out, Larch is mostly developed on my M1 Macbook, so yes it should work. But many of the libraries are only available for x86_64, so we're still using that - and probably will for a while.

MarcoVando commented 9 months ago

No worries and thank you for the answer. I see. In any case, the program runs smoothly. Thank you so much