# Help for building python plugin

**URL:** https://discourse.paraview.org/t/help-for-building-python-plugin/10565
**Category:** ParaView Support
**Tags:** python
**Created:** [October 21, 2022, 8:40am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565 "2022-10-21T08:40:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Eloise](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Eloise](https://discourse.paraview.org/u/Eloise)
#### Post date: [October 21, 2022, 8:40am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/1 "2022-10-21T08:40:18Z")

</div>

Hello,

I have some python scripts which give access to new filters we developed. For now, to access to this filters in paraview I added to my PV\_PLUGIN\_PATH the path to my scripts directory and it works well.

I want now to transform this into a paraview plugin which will be then integrated in my gitlab project with CI tests related.

To this end, I follow the examples to how to build a paraview plugin with python files:  
[https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PythonAlgorithm/](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PythonAlgorithm/)  
and  
[https://gitlab.kitware.com/paraview/paraview/-/tree/master/Examples/Plugins/PythonOnlyExample](https://gitlab.kitware.com/paraview/paraview/-/tree/master/Examples/Plugins/PythonOnlyExample)

And I have some issues with this =o

Let’s take the simple exemple with PythonOnlyExample. I copied/pasted the folder in my project and change my CMakelist to integrate it in my compilation.  
When I load in paraview the created module, I don’t see any change in my GUI but I can go in the integrated pythonShell and do

`import helloworld` and then have access to helloworld.py declared function (such as “PreserveInputTypeFilter”).  
From what I read, this is the normal behavior, so I continue my integration.

I added to this folder the PythonAlgorithmExamples.py file and added to my CMakelist too and rebuild my project.

I load the created module in paraview but don’t see any new sources in my GUI (even with ctrl+space). Here again I can do `import PythonAlgorithmExamples` and then can call PythonAlgorithmExamples.PythonSuperquadricSource(). However executing this do not create any item in my pipeline and does not seems to have GUI impact.

My conclusion to all of it is that there is something I do not understand and I do the things wrong. However, I search on many issues in this discourse and I could not find answers.

Can somebody explain to me what I do wrong ?

Regards,  
Eloïse

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 24, 2022, 3:28am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/2 "2022-10-24T03:28:12Z")

</div>

Hi @Eloise

So you want to build a python plugin into a shared library, is that correct ?

Best,

---

<div class="post-metadata">

### Author: ![Eloise](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/35a633/32.png) [@Eloise](https://discourse.paraview.org/u/Eloise)
#### Post date: [October 24, 2022, 6:48am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/3 "2022-10-24T06:48:03Z")

</div>

Yes,  
At the end, I want a plugin mypythons.so and load it in paraview =)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 31, 2022, 8:00am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/4 "2022-10-31T08:00:50Z")

</div>

Hi @Eloise

Turns out this may not be working as expected:

[https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/5695](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/5695)

[https://gitlab.kitware.com/paraview/paraview/-/issues/21632](https://gitlab.kitware.com/paraview/paraview/-/issues/21632)

Best,

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 15, 2022, 4:34pm UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/5 "2022-12-15T16:34:49Z")

</div>

Confirmed to be non fonctionnal (and soon to be cleaned up), but this feature (compiling a python plugin into a shared library) could be added.

---

<div class="post-metadata">

### Author: ![theodorebaltis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e480ec/32.png) [@theodorebaltis](https://discourse.paraview.org/u/theodorebaltis)
#### Post date: [December 19, 2022, 5:56pm UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/6 "2022-12-19T17:56:53Z")

</div>

I’ve wondered for a while if this was possible, I didn’t know that it was (intended to be)!

Just raising my hand here to say “I want this, too!”

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 25, 2025, 8:15am UTC](https://discourse.paraview.org/t/help-for-building-python-plugin/10565/7 "2025-04-25T08:15:13Z")

</div>

This is now possible ([https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/7229](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/7229)) and the example have been restored ([https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/7263](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/7263))
