# How to bundle Anaconda-installed paraview package using pyinstaller

**URL:** https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638
**Category:** ParaView Support
**Tags:** python
**Created:** [July 19, 2021, 3:28am UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638 "2021-07-19T03:28:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Denny\_Wey](https://discourse.paraview.org/user_avatar/discourse.paraview.org/denny_wey/32/7161_2.png) [@Denny\_Wey](https://discourse.paraview.org/u/Denny_Wey)
#### Post date: [July 19, 2021, 3:28am UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/1 "2021-07-19T03:28:51Z")

</div>

> <https://stackoverflow.com/questions/68421107/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller>

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 19, 2021, 6:34pm UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/2 "2021-07-19T18:34:25Z")

</div>

@ben.boeckel Any idea?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 19, 2021, 7:31pm UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/3 "2021-07-19T19:31:42Z")

</div>

Sorry, but no, I’m not familiar at all with `pyinstaller` at all. It seems it isn’t finding the main VTK libraries properly? Does it work with other C or C++ projects with Python bindings?

---

<div class="post-metadata">

### Author: ![Denny\_Wey](https://discourse.paraview.org/user_avatar/discourse.paraview.org/denny_wey/32/7161_2.png) [@Denny\_Wey](https://discourse.paraview.org/u/Denny_Wey)
#### Post date: [July 21, 2021, 2:59am UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/4 "2021-07-21T02:59:54Z")

</div>

Yes, it does. `pyinstaller` can automatically bundle a lot of other C/C++ based dependencies like PyQt (referring to [pyinstaller supported packages](https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages),) just by looking for all their sub-dependencies (perhaps not entirely automatically, but with a pre-written list of sub-dependencies). I guess it’s just because no one has tried bundling paraview with pyinstaller like this, the particular “dependency list” for paraview never existed. As a result pyinstaller might miss some vtk libs while attempting to bundle on its own.  
But as I have said in the [original post](https://stackoverflow.com/questions/68421107/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller) I tried to move the whole paraview module directory to the destination directory but still fails… Is there possibility that I may miss other paraivew’s module files, or did I move them to the wrong place?  
If you’re not familiar with `pyinstaller`, perhaps any idea regarding the first question? (“Is there possibility that I may miss other paraivew’s module files, by only including `{miniconda_root}/miniconda3/lib/python3.9/site-packages/paraview/modules`?”)  
Many thanks for your attention!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 21, 2021, 1:04pm UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/5 "2021-07-21T13:04:13Z")

</div>

> [@Denny\_Wey](#):
>
> I tried to move the whole paraview module directory to the destination directory but still fails… Is there possibility that I may miss other paraivew’s module files, or did I move them to the wrong place?

I imagine in an Anaconda build, the libraries live in `<prefix>/lib` and the modules are in `<prefix>/lib/pythonX.Y/site-packages`. This relative path setup is likely to need to be preserved since ParaView uses `$ORIGIN/../../../lib` (or similar) to ensure that the core libraries can by found from the Python module.

---

<div class="post-metadata">

### Author: ![Miles\_Bush](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miles_bush/32/15254_2.png) [@Miles\_Bush](https://discourse.paraview.org/u/Miles_Bush)
#### Post date: [September 25, 2024, 6:14pm UTC](https://discourse.paraview.org/t/how-to-bundle-anaconda-installed-paraview-package-using-pyinstaller/7638/6 "2024-09-25T18:14:31Z")

</div>

Any update on this?

I’m receiving the same import error for `paraview.modules.vtkPVVTKExtensionsCore` when attempting to bundle my application with paraview using PyInstaller.
