Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 installation not working #95

Open
lorenzsp opened this issue Apr 17, 2024 · 3 comments
Open

M1 installation not working #95

lorenzsp opened this issue Apr 17, 2024 · 3 comments

Comments

@lorenzsp
Copy link
Collaborator

I am running into problems when installing on an M1. The old installation method described below works only when running the final command python setup.py install --ccbin /usr/bin/ two times. The first time I run the command, I get a cython error. If I run the command again, it works.

Old installation:

  1. Install Anaconda if you do not have it.
  2. Create a virtual environment. Note: There is no available conda compiler for Windows. If you want to install for Windows, you will probably need to add libraries and include paths to the setup.py file.
    If on linux:
conda create -n few_env -c conda-forge gcc_linux-64 gxx_linux-64 wget gsl lapack=3.6.1 hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.7
conda activate few_env

If on MACOSX, substitute gcc_linux-64 and gxx_linus-64 with clang_osx-64 and clangxx_osx-64 as follows:

conda create -n few_env -c conda-forge clangxx_osx-64 clang_osx-64 wget gsl lapack=3.6.1 hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.7
conda activate few_env

If on M1 chip use the following command:

conda create -n few_env -c conda-forge wget gsl hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.9 openblas lapack liblapacke
conda activate few_env
  1. Clone the repository.
git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
cd FastEMRIWaveforms
  1. If on MACOSX or linux run install:
python setup.py install

If on M1 chip use the following command:

python setup.py install --ccbin /usr/bin/
@Philip-Lynch
Copy link

I am currently facing the same problem (M1 chip trying to install FEW 1.5.5 master branch).
However, now when I try installing following this path (or any of the others), I get the following error:

src/inspiralwrap.cpp:5181:20: error: no member named 'dealloc' in 'ODECarrier'
__pyx_v_self->g->dealloc();

Running the command twice doesn't fix it.

@lorenzsp
Copy link
Collaborator Author

I found a temporary solution to install FEW on M1-2 chips.

git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
cd FastEMRIWaveforms
git checkout e4038da
conda create -n few_env -c conda-forge wget gsl hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.9 openblas lapack liblapacke\nconda activate few_env
conda activate few_env   
python setup.py install --ccbin /usr/bin/
python -m unittest discover

This should solve the installation temporarily and solve issues #96 #93 . Let me know if it works!

@SSL32081
Copy link

SSL32081 commented Jun 6, 2024

I found a temporary solution to install FEW on M1-2 chips.

git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
cd FastEMRIWaveforms
git checkout e4038da
conda create -n few_env -c conda-forge wget gsl hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.9 openblas lapack liblapacke\nconda activate few_env
conda activate few_env   
python setup.py install --ccbin /usr/bin/
python -m unittest discover

This should solve the installation temporarily and solve issues #96 #93 . Let me know if it works!

For me, I changed python setup.py install --ccbin /usr/bin/ to python -m pip install . then it worked.
otherwise, it has this error when testing:

ImportError: dlopen(/Path/to/conda/envs/emri_env/lib/python3.9/site-packages/few-1.5.4-py3.9-macosx-11.0-arm64.egg/pyUtility.cpython-39-darwin.so, 0x0002): tried: '/Path/to/conda/envs/emri_env/lib/python3.9/site-packages/few-1.5.4-py3.9-macosx-11.0-arm64.egg/pyUtility.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Path/to/conda/envs/emri_env/lib/python3.9/site-packages/few-1.5.4-py3.9-macosx-11.0-arm64.egg/pyUtility.cpython-39-darwin.so' (no such file), '/Path/to/conda/miniconda3/envs/emri_env/lib/python3.9/site-packages/few-1.5.4-py3.9-macosx-11.0-arm64.egg/pyUtility.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

(I am on an M1 Mac)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants