ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
608 stars 161 forks source link

ANTsPy does not install (from source) #487

Closed rohitrango closed 1 week ago

rohitrango commented 1 year ago

Describe the bug Upon trying to install ANTsPy from source, the build fails with the following error:

image

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/ANTsX/ANTsPy
  2. cd ANTsPy
  3. python setup.py install

Commit ID: 7c9c3ed3d575ce30c4c19f6597772466d4457951

On step 3, the setup script downloads and installs ITK, but then the error above shows up. I also tried installing ITKv5 and setting ITK_DIR which the setup script recognizes, but I still face an error at the same point. Note that I'm able to install and run the original ANTs program (and the bash scripts) with the installed ITK.

Expected behavior Script should install ANTsPy.

Environment I used a fresh conda environment to install ANTsPy. Python version 3.7 (don't think this error has anything to do with this info though).

Desktop (please complete the following information):

ntustison commented 1 year ago

@cookpa --- Here's the code snippet in question from above:

https://github.com/ANTsX/ANTs/blob/master/Tensor/TensorFunctions.h#L682C1-L691

That return type looks wrong. I don't know how we haven't seen this before.

rohitrango commented 1 year ago

this is not the only error however, fixing these two lines of code gives a new build error later.

image

Perhaps its some systematic typecast error?

I'm using the pre-built binary for now.

ntustison commented 1 year ago

Perhaps its some systematic typecast error?

I doubt it. This is at the level of ITK. I'm going to update the ITK tag in ANTs and the ANTs tag here and then we can reassess.

cookpa commented 1 year ago

Hi @rohitrango , did these fixes help? The wheels are building on Ubuntu 22.04.

If you're still having trouble, could you give some more details of your system (compiler, CMake version)?