# paraview.simple Namesspace in IDE (e.g. Pycharm)

**URL:** https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531
**Category:** ParaView Support
**Tags:** python
**Created:** [October 8, 2020, 11:03pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531 "2020-10-08T23:03:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Mezzerine](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mezzerine/32/11796_2.png) [@Mezzerine](https://discourse.paraview.org/u/Mezzerine)
#### Post date: [October 8, 2020, 11:03pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/1 "2020-10-08T23:03:43Z")

</div>

Hi all,

I use an IDE (Pycharm) to develop some postprocessing scripts with Python for Paraview. It starts to complain that it cannot resolve references, this is logical since the paraview.simple module is only available through pvpython or pvbatch as far as I know. However, it would be nice if I can import just the namespace of paraview.simple (or any other paraview module) in my IDE such that these complaints vanish (and I can use tab completion etc.) Is this possible?

Regards,  
Arjan

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [October 9, 2020, 8:57pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/2 "2020-10-09T20:57:18Z")

</div>

Arjan,  
You’ll need three things:1. use the same python version as paraview binary was built with. (or build paraview from source using the system python)  
2. Set PYTHONPATH to point to a list of directories where paraview stores its python files  
3. Set LD\_LIBRARY\_PATH (on Unix or equivalent on other platforms) to point to where paraview stores its DLLs.

After that you can run paraview scripts using the system python and probably with pycharm (if pycharm uses the system python).

Dan

---

<div class="post-metadata">

### Author: ![Mezzerine](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mezzerine/32/11796_2.png) [@Mezzerine](https://discourse.paraview.org/u/Mezzerine)
#### Post date: [October 13, 2020, 3:44pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/3 "2020-10-13T15:44:24Z")

</div>

Thanks,

I tested it for different versions of python with the expected result (it Almost works…). Getting the python versions equal is however a bit of a challenge whereas I’m not in complete control.

---

<div class="post-metadata">

### Author: ![lhofmann](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@lhofmann](https://discourse.paraview.org/u/lhofmann)
#### Post date: [October 13, 2020, 4:18pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/4 "2020-10-13T16:18:25Z")

</div>

You could set `pvpython` as the interpreter used in Pycharm.  
For this, rename or symlink the `pvpython` executable to `pythonpv` and add this executable as a System Interpreter in Pycharm (Settings → Project → Project Interpreter). For some reason, this only works if the executable’s name starts with python.

---

<div class="post-metadata">

### Author: ![Mezzerine](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mezzerine/32/11796_2.png) [@Mezzerine](https://discourse.paraview.org/u/Mezzerine)
#### Post date: [October 14, 2020, 8:38am UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/5 "2020-10-14T08:38:27Z")

</div>

This actually works, except that you cannot open a console because of a missing \_ssl module. Is this easy to add?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 14, 2020, 9:11am UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/6 "2020-10-14T09:11:00Z")

</div>

alas, no. It was explicitly removed due to request from certain cites so that the binaries pass their security muster. I am assuming you’re on Windows. You should be able to simply download the Python binaries from [python.org](http://python.org) for the appropriate version and then copy the ssl dll over.

---

<div class="post-metadata">

### Author: ![Mezzerine](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mezzerine/32/11796_2.png) [@Mezzerine](https://discourse.paraview.org/u/Mezzerine)
#### Post date: [October 14, 2020, 2:49pm UTC](https://discourse.paraview.org/t/paraview-simple-namesspace-in-ide-e-g-pycharm/5531/7 "2020-10-14T14:49:35Z")

</div>

Actually, I use Linux (Scientific Linux 7)

I got it almost to work. I’ve recompiled the correct python version (3.7.4 for Paraview 5.8.1). I’ve added the following directories to the PYTHONPATH:  
\<paraviewHome\>/lib/python3.7/lib-dynload  
\<paraviewHome\>/lib/python3.7/site-packages

Now I can import python.simple in Pycharm and can also use all of its functionality. I can use ExtractBlock for example and it will give me the expected results

However, in Pycharm the names of the filters are still not defined (unresolved reference), like for example ExtractBlock. If I look in the Python directory within Paraview I see that this name is not defined in any \*.py file. I’ve also added several directories with libraries in the LD\_LIBRARY\_PATH variable to no avail:  
\<paraviewHome\>/lib/python3.7/site-packages/vtkmodules  
\<paraviewHome\>/lib/python3.7/lib-dynload  
\<paraviewHome\>/lib  
\<paraviewHome\>/lib/python3.7/site-packages/paraview/modules
