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

Installation not working on M1 Macs #136

Closed
AdrianButnar opened this issue Oct 24, 2021 · 4 comments
Closed

Installation not working on M1 Macs #136

AdrianButnar opened this issue Oct 24, 2021 · 4 comments

Comments

@AdrianButnar
Copy link

AdrianButnar commented Oct 24, 2021

I have tried installing using pip install itk-elastix on my M1 Macbook, but I get the error:

ERROR: Could not find a version that satisfies the requirement itk-elastix (from versions: none) ERROR: No matching distribution found for itk-elastix

I have tried with Python 3.7, 3.8 and 3.9 with no success. I have also tried compiling from source with no success.
My experience with compiling these sort of packages is minimal? Could you provide some help?

@NHPatterson
Copy link

NHPatterson commented Dec 28, 2021

I am also having an issue on M1. I can install the x64_x86 macos package (done through pypi), but I get the following error on initialization of itk-elastix.

import itk
import numpy as np

im = np.random.randint(0,255,(1024,1024),dtype=np.uint8)

# works!
itk.GetImageFromArray(im)

# elx stuff below doesn't work
itk.ElastixRegistrationMethod.New(im, im)

itk.elastix_registration_method(im,im)
Traceback (most recent call last):
  File "/Users/nhp/opt/miniconda3/envs/wsireg-dev/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3457, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-16-4b8bda8d082a>", line 1, in <module>
    itk.elastix_registration_method(im,im)
  File "/Users/nhp/opt/miniconda3/envs/wsireg-dev/lib/python3.8/site-packages/itk_core-5.3rc2.post1-py3.8-macosx-10.9-x86_64.egg/itk/support/lazy.py", line 130, in __getattribute__
    value = types.ModuleType.__getattribute__(self, attr)
AttributeError: module 'itk' has no attribute 'elastix_registration_method'

@williamc96
Copy link

I'm having this issue too. Is there any plans to continue supporting this for new mac models or are we out of luck? It does look like someone else had success with the original SimpleElastix.

@thewtex
Copy link
Member

thewtex commented Sep 26, 2022

Experimental itk-elastix 0.14.2 binary wheels for M1 / arm mac's have been uploaded to PyPI for 3.9, 3.10 -- please give them a try and let us know how it goes!

@williamc96
Copy link

Looks like it's working! Thanks for the quick fix/response!

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

4 participants