# Fail in importing paraview.simple in python script

**URL:** https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891
**Category:** ParaView Support
**Tags:** python
**Created:** [March 25, 2020, 11:48pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891 "2020-03-25T23:48:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![leoncwu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@leoncwu](https://discourse.paraview.org/u/leoncwu)
#### Post date: [March 25, 2020, 11:48pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/1 "2020-03-25T23:48:50Z")

</div>

I want to use an external Python 3 interpreter to control Paraview by importing the paraview.simple module on Windows. I have already included the following path to the sys.path

ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit/bin/Lib/site-packages

However, I still get the following error message when I tried to execute the script:

#osp: INITIALIZATION ERROR --\> could not open module lib ospray\_module\_ispc: The specified module could not be found.

Any suggestions?

---

<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: [March 26, 2020, 3:08am UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/2 "2020-03-26T03:08:41Z")

</div>

[https://www.paraview.org/Wiki/ParaView/Python\_Scripting#Getting\_Started](https://www.paraview.org/Wiki/ParaView/Python_Scripting#Getting_Started)

---

<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: [March 26, 2020, 12:27pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/3 "2020-03-26T12:27:07Z")

</div>

I suspect you’ll also need `PATH` entries to help finding some of the other dynamically loaded bits (such as OSPRay backends).

---

<div class="post-metadata">

### Author: ![leoncwu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@leoncwu](https://discourse.paraview.org/u/leoncwu)
#### Post date: [March 26, 2020, 1:19pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/4 "2020-03-26T13:19:11Z")

</div>

Hi, thank you so much for the reply. I have read this tutorial, but it does not seem to help. What is the difference between the “PYTHONPATH” and “PATH” mentioned in the tutorial. I actually cound not find the “PYTHONPATH” in the Windows environment.

---

<div class="post-metadata">

### Author: ![leoncwu](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@leoncwu](https://discourse.paraview.org/u/leoncwu)
#### Post date: [March 26, 2020, 1:20pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/5 "2020-03-26T13:20:54Z")

</div>

Hi, thank you so much for your suggestion. Is the “path” you mentioned different from the the “sys.path” I modified?

---

<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: [March 26, 2020, 3:26pm UTC](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891/6 "2020-03-26T15:26:55Z")

</div>

`sys.path` is where Python looks for imports and such. The `PATH` environment variable is where the operating system will look for DLLs that need to be loaded.
