# "could not open module lib ospray\_module\_ispc"

**URL:** https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079
**Category:** ParaView Support
**Tags:** python
**Created:** [April 15, 2020, 7:32pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079 "2020-04-15T19:32:10Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Louis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/ecb155/32.png) [@Louis](https://discourse.paraview.org/u/Louis)
#### Post date: [April 15, 2020, 7:32pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/1 "2020-04-15T19:32:10Z")

</div>

When loading paraview.simple, from paraview version 5.8, on windows, with my own python 3.7, I get this error dozens of times.

```auto
#osp: INITIALIZATION ERROR --> could not open module lib ospray_module_ispc: The specified module could not be found.

```

This does not seem to cause runtime issues, the import ‘finishes’ and most of the basic paraview.simple functions are usable but the errors worry me.

I have added

\<pv\_install\>\bin\Lib  
\<pv\_install\>\bin\Lib\site-packages  
to my  
\<python\_install\>\Lib\site-packages\python37.pth

which is what got paraview.simple importing in the first place. I believe this is how to simulate PYTHONPATH on windows (but could be wrong?)

I have also added several things to my PATH.

\<pv\_install\>\bin  
\<pv\_install\>\bin\DLLs  
\<pv\_install\>\bin\Lib  
\<pv\_install\>\bin\Lib\site-packages

\<pv\_install\>\bin\Lib\site-packages\paraview\modules

I included ‘paraview\modules’ because I saw that the ospray.dll is in there but I’m not suuure if that’s helping anything…

I have reviewed this documentation which is where I got the PYTHONPATH and PATH items  
[https://www.paraview.org/Wiki/ParaView/Python\_Scripting#Getting\_Started](https://www.paraview.org/Wiki/ParaView/Python_Scripting#Getting_Started)  
As well as two threads:

> [@Not able to import paraview.simple module on windows](https://discourse.paraview.org/t/not-able-to-import-paraview-simple-module-on-windows/537):
>
> Hello everybody, My first post here. I first asked my question [here on StackOverflow](https://stackoverflow.com/questions/52206088/using-python-scripting-to-plot-integration-of-a-variable-over-a-line-versus-time), and then I was [told](https://twitter.com/Kitware/status/1037796836764004353) to come here. To solve my own problem I’m trying to follow [this documentation](https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/quick-start.html). According to that page I have to add these two folders to my PATH: C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib C:\Program Files\ParaView 5.4.1-822-g597adef-Qt5-Windows-64bit\bin\Lib\site-packages I also have Python Python 3.6.5 installed. But when I run the Python shell ant tryo to i…

> [@Fail in importing paraview.simple in python script](https://discourse.paraview.org/t/fail-in-importing-paraview-simple-in-python-script/3891):
>
> 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?

I am specifically using this paraview install: ParaView-5.8.0-Windows-Python3.7-msvc2015-64bit.exe  
And Python 3.7.0 (Could I need a different specific version of 3.7.X?)

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [August 3, 2020, 9:09am UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/2 "2020-08-03T09:09:31Z")

</div>

Hi I’m having the same error, did you find a way to solve this 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 3, 2020, 11:11am UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/3 "2020-08-03T11:11:40Z")

</div>

Try setting your PATH (or `LD_LIBRARY_PATH` on Linux and `DYLD_LIBRARY_PATH` on macOS) to the directory containing the `ospray_module_ispc` shared library.

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [August 3, 2020, 11:19am UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/4 "2020-08-03T11:19:07Z")

</div>

For me ospray\_module\_ispc is located in “C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin” so I’ve set both my user and system variables to this path.

But it doesn’t change anything.

---

<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 3, 2020, 1:11pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/5 "2020-08-03T13:11:48Z")

</div>

@Dave_DeMarle, any ideas?

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [August 5, 2020, 3:05pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/6 "2020-08-05T15:05:44Z")

</div>

not yet, I’m looking in to similar items on mac and will try and look into this too

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [August 18, 2020, 8:48pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/7 "2020-08-18T20:48:08Z")

</div>

I have a fix in progress over on the OSPRay’s rkcommon project now. It seems that the way ParaView binaries anchor OSPRay’s dynamic library search point to be relative to the ParaView binary makes it impossible for the user to extend the search path via LD\_LIBRARY\_PATH and the like. See Library::Library in ospray1/rkcommon for the details.

I am hopeful that my change will solve the issue once merged and propagated up to ParaView.

---

<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 18, 2020, 10:26pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/8 "2020-08-18T22:26:18Z")

</div>

cc: @ben.boeckel

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [September 10, 2020, 2:06pm UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/9 "2020-09-10T14:06:31Z")

</div>

The fix is under review [here](https://gitlab.kitware.com/paraview/paraview-superbuild/-/merge_requests/766) and will likely appear in ParaView 5.9. With the change, OSPRay’s runtime library resolution will take user defined PATHS into account.

---

<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: [January 29, 2021, 5:11am UTC](https://discourse.paraview.org/t/could-not-open-module-lib-ospray-module-ispc/4079/10 "2021-01-29T05:11:54Z")

</div>

Just want to follow up here

I ran into the same issue with 5.8, ended up here, tried with 5.9 and alas the errors are gone!
