# How to: Install pymedphys in MacOS

**URL:** <https://discourse.slicer.org/t/how-to-install-pymedphys-in-macos/12870>\
**Category:** Development\
**Tags:** python\
**Created:** [August 6, 2020, 10:02am UTC](https://discourse.slicer.org/t/how-to-install-pymedphys-in-macos/12870 "2020-08-06T10:02:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Vergara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/alex_vergara/32/15205_2.png) [@Alex\_Vergara](https://discourse.slicer.org/u/Alex_Vergara)\
**Post date:** [August 6, 2020, 10:02am UTC](https://discourse.slicer.org/t/how-to-install-pymedphys-in-macos/12870/1 "2020-08-06T10:02:49Z")

</div>

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:

```auto
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](https://github.com/BishopWolf/GammaIndex)  
Feel free to propose changes

Cheers

---

<div class="post-metadata">

**Author:** ![Alex\_Vergara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/alex_vergara/32/15205_2.png) [@Alex\_Vergara](https://discourse.slicer.org/u/Alex_Vergara)\
**Post date:** [September 9, 2020, 9:49am UTC](https://discourse.slicer.org/t/how-to-install-pymedphys-in-macos/12870/2 "2020-09-09T09:49:01Z")

</div>

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')`
