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

SlicerRadiomics unavailable for macOS since Slicer Preview 5.3.0 as of 2023-03-31 #77

Open
jamesobutler opened this issue Apr 21, 2023 · 19 comments

Comments

@jamesobutler
Copy link
Contributor

The SlicerRadiomics extension has had build errors since March 31st, 2023 that has made it unavailable on macOS
https://slicer.cdash.org/viewBuildError.php?buildid=2985286

It is unable to build a macOS whl of pyradiomics. Around the time when this extension started to fail,

cc: @JoostJM @fedorov

@jamesobutler
Copy link
Contributor Author

Building of the wheel is continuing to fail.

Is the master branch necessary or could pyradiomics be installed using the latest whl from a couple weeks ago (https://pypi.org/project/pyradiomics/3.1.0/#files)?

ExternalProject_SetIfNotDefined(
${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
"origin/master"
QUIET

@fedorov
Copy link
Collaborator

fedorov commented Jun 1, 2023

@jamesobutler I was never involved in any whl-related topics, and unfortunately cannot be of much help.

@hugoaerts is the lead of the lab maintaining pyradiomics, so perhaps he can help point to any other folks involved in the maintenance, since I am not sure Joost is actively working on pyradiomics anymore.

@jamesobutler
Copy link
Contributor Author

It appears @JoostJM has been actively pushing updates to pyradiomics and generating a new release (https://github.com/AIM-Harvard/pyradiomics/commits/master). Just wondering who might be providing the maintenance here in the SlicerRadiomics extension. Is that @hugoaerts?

@fedorov
Copy link
Collaborator

fedorov commented Jun 1, 2023

It is unable to build a macOS whl of pyradiomics.

If pyradiomics whl fails to build, it is something that should be fixed in pyradiomics, I would expect. I do not now how whl build in pyradiomics works. The reality is this extension was developed with a funding from a grant that is long over. I am not sure there is anyone funded to provide maintenance of this extension. If anyone it would be Hugo and his team.

@JoostJM
Copy link
Contributor

JoostJM commented Jun 2, 2023

Hi,
As @fedorov mentioned, the grant covering PyRadiomics has ended and I'm not actively developing PyRadiomics. Still, I did find some spare time to update PyRadiomics CI, so I could make a new release (with support for more recent Python versions).

Currently, SlicerRadiomics builds PyRadiomics from the master branch, keeping it more up-to-date with the PyRadiomics repository (instead of just the latest release). I'll try to find some spare time to update SlicerRadiomics to use the latest release of PyRadiomics. For the forseable future, this should fix the error.

Finally, I reviewed the build log. The build step is failing to compile the C-extensions as CMAKE apparently cannot find stdlib.h anymore. On windows, I sometimes got this error when trying to build PyRadiomics inside a virtualenv, but I'm not sure why this error occurs in macOS now.
A quick google search yielded this thread on stackoverflow. It's possible this is related to the error for SlicerRadiomics.

@jcfr
Copy link
Collaborator

jcfr commented Jun 2, 2023

@JoostJM It should be fairly straightforward to transition this project to use scikit-build 1 and cibuildwheel2

In the context of the development of scikit-build-core (the new backend for sckit-build), we have funding to transition few projects.

Considering all pyradiomics dependency are available as wheels, updating pyradiomics would be a good candidate.

Dependencies

dependency wheels available PyPI
numpy ✔️ https://pypi.org/project/numpy/#files
SimpleITK ✔️ https://pypi.org/project/SimpleITK/#files
PyWavelets ✔️ https://pypi.org/project/PyWavelets/#files
pykwalify ✔️ https://pypi.org/project/pykwalify/#files
six ✔️ https://pypi.org/project/six/#files

Proposed Plan

@JoostJM In the next week or two, I should be able to tackle this. In the meantime, could you grant me owner access. This would greatly streamline the process. 🙏

Footnotes

  1. https://github.com/scikit-build/scikit-build/

  2. https://cibuildwheel.readthedocs.io

@jcfr
Copy link
Collaborator

jcfr commented Jun 2, 2023

is the master branch necessary or could pyradiomics be installed using the latest whl

We should install from wheels, back in 2018 I added support for building from source because:

  • Slicer python integration was different. Since we then, we support install wheels
  • some dependencies of pyradiomics where not available as wheels

@fedorov
Copy link
Collaborator

fedorov commented Jun 2, 2023

@jcfr I've just added you as a maintainer. Will this be sufficient or you need the owner rights?

@jcfr
Copy link
Collaborator

jcfr commented Jun 2, 2023

Thanks @fedorov . For SlicerRadiomics, since we are not setting up CI and alike that will work well.

@fedorov
Copy link
Collaborator

fedorov commented Jun 2, 2023

Thank you for your help JC!

@fedorov
Copy link
Collaborator

fedorov commented Jan 25, 2024

@fedorov
Copy link
Collaborator

fedorov commented Jan 25, 2024

@jamesobutler @jcfr is this as simple as removing pyradiomics from CMake and installing it with slicer.util.pip_install('pyradiomics') as part of the module initialization?

@jcfr
Copy link
Collaborator

jcfr commented Jan 27, 2024

If all dependencies are distributed as wheels, answer would be yes.

I can help with that during the project week.

@kirbyju
Copy link

kirbyju commented May 2, 2024

Hi, is work to resolve this still under consideration? I am running a preview build of Slicer 5.7 and don't see pyradiomics as an extension to install. I'm also still unable to install it via pip in my local python environment.

@pieper
Copy link
Collaborator

pieper commented May 3, 2024

@kirbyju what error do you get when you use pip_install? For me on 5.6.1 on a mac book air m2 it installs and imports as expected.

is work to resolve this still under consideration?

Yes, although I'm not sure anyone has resources to work on it currently.

@kirbyju
Copy link

kirbyju commented May 4, 2024

Hi @pieper, here's the pyradiomics-pip-error.txt I get when installing with pip3. I think there's already an open issue about this (AIM-Harvard/pyradiomics#872) but I understand the resource issue. I am currently taking a look at MIRP to see if that would be a suitable alternative for our purposes.

@jamesobutler
Copy link
Contributor Author

@kirbyju You should be able to successfully install pyradiomics from within Slicer's python by doing slicer.util.pip_install('pyradiomics') in the Slicer python console. As indicated at https://pypi.org/project/pyradiomics/3.1.0/#files there are Windows, macOS and Linux whl files for Python 3.9 which is the version that Slicer is using.

Problematic for pyradiomics is that there are no whl files for Python 3.10, 3.11 or 3.12. That would result in the source being downloaded and then the package attempted to be compiled for the given OS which could be problematic if users don't have the correct dependencies.

@pieper
Copy link
Collaborator

pieper commented May 4, 2024

Thanks @jamesobutler , yes, using pyradiomics within the Slicer environment's python is a good option.

@kirbyju I don't know about MIRP, but from a quick looks okay, but it has an EUPL, which is apparently copyleft like GPL so we wouldn't use it for Slicer purposes.

If there are python coders among the pyradiomics user community it would be great for them to step up and help with maintenance. The pyradiomics paper has lots of citations so people must be using it.

@kirbyju
Copy link

kirbyju commented May 4, 2024

Thanks for the info!

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

6 participants