# pyinstaller with RTK+VTK

**URL:** https://discourse.itk.org/t/pyinstaller-with-rtk-vtk/6556
**Category:** Algorithms
**Tags:** itk, python
**Created:** [April 8, 2024, 9:15am UTC](https://discourse.itk.org/t/pyinstaller-with-rtk-vtk/6556 "2024-04-08T09:15:28Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 24, 2024, 8:14pm UTC](https://discourse.itk.org/t/pyinstaller-with-rtk-vtk/6556/5 "2024-04-24T20:14:56Z")

</div>

Hi,

This post is helpful for the pyinstaller + ITK + RTK process:

> [@ITK Python pyinstaller issue](https://discourse.itk.org/t/itk-python-pyinstaller-issue/1520/4):
>
> You can try to use a hook file with this content: # This pyinstaller hook file does not support ITK with `WrapITK.pth`. from PyInstaller.utils.hooks import collect\_data\_files hiddenimports = ['new'] # If ITK is pip installed, gets all the files. itk\_datas = collect\_data\_files('itk', include\_py\_files=True) datas = [x for x in itk\_datas if '\_\_pycache\_\_' not in x[0]] Save the code above in a file called hook-itk.py and add --additional-hooks-dir= to the command line calling pyinstaller, with t…

---

_[View the full topic](https://discourse.itk.org/t/pyinstaller-with-rtk-vtk/6556)._
