# Pip install packages that need compilation

**URL:** <https://discourse.slicer.org/t/pip-install-packages-that-need-compilation/12859>\
**Category:** Development\
**Tags:** python, pip\
**Created:** [August 4, 2020, 10:32pm UTC](https://discourse.slicer.org/t/pip-install-packages-that-need-compilation/12859 "2020-08-04T22:32:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 4, 2020, 11:20pm UTC](https://discourse.slicer.org/t/pip-install-packages-that-need-compilation/12859/2 "2020-08-04T23:20:42Z")

</div>

Yes, for ones that need to be compiled I would suggest to do the method described in this post so that it is compiled and packaged at time of building the extension. The build machine of the extension would then be the one that would need the build requirements.

> [@Install python library with extension](https://discourse.slicer.org/t/install-python-library-with-extension/10110/8):
>
> Ciao @PaoloZaffino, if your extension is in the extension manager, you can actually do it directly in the cmake (so they will be packed at compilation time on the kitware factory machines): add python requirements in the superbuild: [https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild.cmake#L28](https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild.cmake#L28)[https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild/slicerastro-requirements.txt](https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild/slicerastro-requirements.txt)[https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild/External\_python-slicerastro-requirements.…](https://github.com/Punzo/SlicerAstro/blob/master/SuperBuild/External_python-slicerastro-requirements.cmake)

---

_[View the full topic](https://discourse.slicer.org/t/pip-install-packages-that-need-compilation/12859)._
