# Importing Paraview Module in Python 3.7/3.8

**URL:** https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722
**Category:** ParaView Support
**Tags:** python
**Created:** [June 30, 2020, 6:32pm UTC](https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722 "2020-06-30T18:32:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jarey99](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Jarey99](https://discourse.paraview.org/u/Jarey99)
#### Post date: [June 30, 2020, 6:32pm UTC](https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722/1 "2020-06-30T18:32:12Z")

</div>

Hello,

I have a python script that I’m attempting to run in Spyder (Python 3.7).  
On a line that tries to import Paraview that says:  
“from paraview.simple import \*”  
An error occurs that says:  
“No module named ‘paraview’”

How can I go about importing the Paraview module into my Spyder IDE? If that’s not possible, how can I import Paraview into my command line Python script?

Thanks.

---

<div class="post-metadata">

### Author: ![ANON1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anon1/32/3919_2.png) [@ANON1](https://discourse.paraview.org/u/ANON1)
#### Post date: [June 30, 2020, 8:09pm UTC](https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722/2 "2020-06-30T20:09:53Z")

</div>

I think you should use `pvpython` instead of Python

---

<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: [June 30, 2020, 8:27pm UTC](https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722/3 "2020-06-30T20:27:55Z")

</div>

Assuming your Python versions between ParaView and Spyder builds are ABI compatible, here’s a way to figure things out.

Run pvpython with following code

```python
import sys
print sys.path

```

The sys.path will begin with a couple of ParaView related directories. Add those to your sys.path in your script for Spyder (or PYTHONPATH environment variable).

On linuxs generally, that’s adequate. On Windows/Mac, you may need to extend you `PATH`/`DYLD_LIBRARY_PATH` to include the directory where a the ParaView dylibs or dlls are as well.

---

<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: [August 21, 2020, 3:38pm UTC](https://discourse.paraview.org/t/importing-paraview-module-in-python-3-7-3-8/4722/4 "2020-08-21T15:38:39Z")

</div>

Just a note for people who might still have issues after messing with sys.path.

I had issues when I added those paths to PYTHONPATH. All of my Anaconda apps (Spyder, Anaconda Navigator, etc.) could not open - I think setting PYTHONPATH confused the apps for where to look for Python. Something along those lines.

Instead, I added them to my PATH variable and I only included the `site-packages` folder path in PYTHONPATH. That way I could still use Anaconda and use the simple module.
