# Simple Module Import Error (Paraview 5.8)

**URL:** https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842
**Category:** ParaView Support
**Tags:** python
**Created:** [July 14, 2020, 8:29pm UTC](https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842 "2020-07-14T20:29:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jclai](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jclai/32/4482_2.png) [@jclai](https://discourse.paraview.org/u/jclai)
#### Post date: [July 14, 2020, 8:29pm UTC](https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842/1 "2020-07-14T20:29:34Z")

</div>

I was following [these directions](https://www.paraview.org/Wiki/ParaView/Python_Scripting#ParaView_and_Python) and tried to import simple.py but was unsuccessful.

I set my system variable PYTHONPATH to  
C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview  
which is where my simple.py file is located.

Using pvpython 5.8, I get this error:  
from .selection import \*  
ImportError: attempted relative import with no known parent package

I also tried setting PYTHONPATH to  
C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages  
but then I get this error:  
ModuleNotFoundError: No module named ‘simple’

---

<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: [July 14, 2020, 10:36pm UTC](https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842/2 "2020-07-14T22:36:14Z")

</div>

When using `pvpython`, you don’t need to set PYTHONPATH at all.

Can you try the following and see if that works:

```bash
# run pvpython
pvpython
# then type the following in the shell (Without the leading `>>>`)
>>> from paraview.simple import *
>>> Sphere()
>>> Show()
>>> Render()

```

---

<div class="post-metadata">

### Author: ![jclai](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jclai/32/4482_2.png) [@jclai](https://discourse.paraview.org/u/jclai)
#### Post date: [July 15, 2020, 2:19am UTC](https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842/3 "2020-07-15T02:19:55Z")

</div>

Oh okay, thank you that worked! Except after the visual popup window appeared, pvpython froze and was unresponsive… but that is a different issue.

---

<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: [August 5, 2020, 1:41am UTC](https://discourse.paraview.org/t/simple-module-import-error-paraview-5-8/4842/4 "2020-08-05T01:41:47Z")

</div>

It might just appear frozen as the view/3D window is not interactive. Your pvpython terminal should still be accepting input. If you type `Interact()`, it will pass the control to the 3D window and then you can interact with it. To quit and return to the terminal, hit the ‘q’ key in the view window.
