Fail in importing paraview.simple in python script

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?

https://www.paraview.org/Wiki/ParaView/Python_Scripting#Getting_Started

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

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.

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

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.