How to: Install pymedphys in MacOS

The current code works in Linux and Windows:

from slicer.util import pip_install; pip_install('pymedphys')

However that is not the case for MacOS. In case you want to use this cool library that includes gamma comparison among other cool stuffs you need to make:

from slicer.util import pip_install
pip_install('dataclasses')
pip_install('pymedphys --no-deps')

And voila, it is working!

Example module for gamma comparison here https://github.com/BishopWolf/GammaIndex
Feel free to propose changes

Cheers

1 Like

From today 09/09/2020: pymedphys has changed its default behaviour and now there is no longer need for this trick. This line will work also in mac

from slicer.util import pip_install; pip_install('pymedphys')

1 Like