ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

Fail to install ANTsPyx on Mac M1

Open mikami520 opened this issue 2 years ago • 19 comments

Describe the bug I use "pip install antspyx" to install antspyx but it gives an error while building Cmake files.

To Reproduce Steps to reproduce the behavior:

  1. Open a terminal
  2. type "pip install antspyx"
  3. See error

Expected behavior Antspyx is successfullt installed

Screenshots Screen Shot 2022-02-23 at 20 41 15

Screen Shot 2022-02-23 at 20 45 25

Screen Shot 2022-02-23 at 20 45 39

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22] Monterey 12.2.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

mikami520 avatar Feb 24 '22 01:02 mikami520

Have you tried installing directly from Github?

git clone https://github.com/ANTsX/ANTsPy
cd ANTsPy
python3 setup.py install

ntustison avatar Feb 24 '22 17:02 ntustison

Have you tried installing directly from Github?

git clone https://github.com/ANTsX/ANTsPy
cd ANTsPy
python3 setup.py install

Yes, I tried that way before, it gave same errors.

mikami520 avatar Feb 24 '22 17:02 mikami520

That's difficult, then, for us --- neither @stnava nor I have the new M1 chip (although we're hoping to get one soon). Are you able to test installation on a different platform?

ntustison avatar Feb 24 '22 17:02 ntustison

That's difficult, then, for us --- neither @stnava nor I have the new M1 chip (although we're hoping to get one soon). Are you able to test installation on a different platform?

Currently I only have one laptop. But I successfully installed antspyx on Google Colab and Linux (a remote GPU)

mikami520 avatar Feb 24 '22 17:02 mikami520

I believe this will be resolved when we update itk + ants tags - but that may not happen too soon. does "regular" ants compile on the M1?

stnava avatar Feb 24 '22 17:02 stnava

I believe this will be resolved when we update itk + ants tags - but that may not happen too soon. does "regular" ants compile on the M1?

I guess it could. Since yesterday I used SuperBuild to compile the ANTs on M1

mikami520 avatar Feb 24 '22 17:02 mikami520

ok - we have not updated the itk/ants tags for antspyx for quite some time. it generally takes me a day or so to update pypi ... don't have that time now. but I pushed updates to the tags just now. you might try to compile from source again ( may need a fresh clone )

stnava avatar Feb 24 '22 17:02 stnava

ok - we have not updated the itk/ants tags for antspyx for quite some time. it generally takes me a day or so to update pypi ... don't have that time now. but I pushed updates to the tags just now. you might try to compile from source again ( may need a fresh clone )

Sounds good, I will have a try later today. thank you so much

mikami520 avatar Feb 24 '22 17:02 mikami520

I pushed a bunch of changes to pybind11 as well as various antspyx things .... I had to remove some functionality that is probably not used much anyway as I didn't have time to think through the fixes for those ... might address the comp issues though.

stnava avatar Feb 24 '22 22:02 stnava

Thanks, @stnava. I'll check out the latest repo for a test drive on some of the stuff I'm working on and let you know if I encounter anything.

ntustison avatar Feb 24 '22 22:02 ntustison

I pushed a bunch of changes to pybind11 as well as various antspyx things .... I had to remove some functionality that is probably not used much anyway as I didn't have time to think through the fixes for those ... might address the comp issues though.

Hi @stnava, I have cloned the latest repository and installed the antspyx. It can now install successfully, but some required modules or dependencies will not automatically installed. It should be done manually. Hope this could be solved in the next version.

mikami520 avatar Feb 25 '22 21:02 mikami520

ok - I just pushed a few fixes minutes ago .... I think this latest push gets us very close to full functionality and probably successful on M1.

stnava avatar Feb 25 '22 21:02 stnava

ok - I just pushed a few fixes minutes ago .... I think this latest push gets us very close to full functionality and probably successful on M1.

Sounds great. Thanks @stnava .

mikami520 avatar Feb 25 '22 21:02 mikami520

ok - I just pushed a few fixes minutes ago .... I think this latest push gets us very close to full functionality and probably successful on M1.

Hi @stnava , when I try to import ants, it gives an error. Here is the screenshot: Screen Shot 2022-02-25 at 16 35 04

mikami520 avatar Feb 25 '22 21:02 mikami520

looks like a PIL issue - maybe reinstall PIL? anyway, I cannot reproduce this one. it may be a couple months or so before we have our own M1 machines on which to test.

stnava avatar Feb 25 '22 22:02 stnava

looks like a PIL issue - maybe reinstall PIL? anyway, I cannot reproduce this one. it may be a couple months or so before we have our own M1 machines on which to test.

I think it may be the error of conda environment, since I can import ants successfully on virtual environment or without conda.

mikami520 avatar Feb 25 '22 22:02 mikami520

ok - that symbol _xcb_connect is not something I've ever seen in connection with ITK or ANTs.

stnava avatar Feb 25 '22 22:02 stnava

Any update? Having ANTsPy working on M1 would be great for a software we are developing.

andreped avatar Aug 30 '22 21:08 andreped

Any update? Having ANTsPy working on M1 would be great for a software we are developing.

I am sorry, I tried on two different M1 Macs, it did not work well

mikami520 avatar Aug 30 '22 21:08 mikami520