Hi pydem team,
I am a MacOS user and failed to install pydem on my Apple Silicon machine with the standard method.
I found that the compile_args.append("-march=x86-64") is hard coded in setup.py, thus any installation from pip or conda would fall. I worked around it by clone the source, modify setup, and install from the source could solve. Just to paste what I did here for your consideration:
1. Prepare dependencies with conda (optional)
I use conda for env management, but this step is totally optional. I follow your instruction of the dependencies
conda create -n pydem python=3.11
conda activate pydem
conda install numpy cython pip wheel setuptools
2. Clone the pyDEM Repository
git clone https://github.com/creare-com/pydem.git
cd pydem
3. Modify setup.py for Apple Silicon Compatibility
In setup.py around line 32, modify to:
compile_args.append("-std=c++17") # making sure compiler is consistent
import platform
arch = platform.machine()
if arch == "arm64" or arch == "aarch64":
compile_args.append("-march=armv8-a") # making sure
After that, I just install from the source code. pip install .
Hi pydem team,
I am a MacOS user and failed to install pydem on my Apple Silicon machine with the standard method.
I found that the
compile_args.append("-march=x86-64")is hard coded insetup.py, thus any installation from pip or conda would fall. I worked around it by clone the source, modify setup, and install from the source could solve. Just to paste what I did here for your consideration:1. Prepare dependencies with conda (optional)
I use conda for env management, but this step is totally optional. I follow your instruction of the dependencies
2. Clone the pyDEM Repository
git clone https://github.com/creare-com/pydem.git cd pydem3. Modify
setup.pyfor Apple Silicon CompatibilityIn
setup.pyaroundline 32, modify to:After that, I just install from the source code.
pip install .