ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

ANTsPy does not install (from source)

Open rohitrango opened this issue 2 years ago • 4 comments
trafficstars

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):

  • OS: Ubuntu 22.04

rohitrango avatar Jul 04 '23 00:07 rohitrango

@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.

ntustison avatar Jul 04 '23 01:07 ntustison

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.

rohitrango avatar Jul 04 '23 13:07 rohitrango

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.

ntustison avatar Jul 04 '23 14:07 ntustison

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)?

cookpa avatar Jul 12 '23 18:07 cookpa