I have a working jupyter-lab installation in my fedora machine. I am able to access the jupyter notebook remotely using my system IP address and basic python commands are working. Now, I am planning to implement a remote visualization setup. I tried the following steps for that:
Download and extract paraview_xxxx.zip
Create a new python virtual environment.
Activate the environment and install ipykernel and ipyparaview
Install the new kernel to jupyter.
Using a notebook, connect to the newly installed kernel, and then try to import paraview.simple import *
<< Stuck at error ModuleNotFoundError: No module named 'paraview'
The extracted paraview zip file is still separated from virtual environments. I don’t know how to connect the site-packages of extracted paraview to my custom created new virtual environment. I tried installing “pip install paraview”, which did not work. Some threads are telling to use pvpython but I did not quite understand “using pvpython”. I am able to do things locally if I run pvpython manually but I dont know how can I integrate the whole setup to the jupyter notebook. Should I execfile() on pvpython before issuing the import command? I know that I am making a stupid mistake somewhere.
I am not the best in understanding how to setup things, so it would be great help if someone can edit the above steps in an easy to follow manner.
If I understand correctly you should have downloaded ParaView from the official releases, so it should have Python support enabled. Can you confirm that ?
For information, you can also take a look at https://gitlab.kitware.com/paraview/iparaview-kernel if you want. Maybe it can give you keys to answer your problem. This project uses ipyvtklink instead of ipyparaview for displaying an interactive widget for rendering, and has been tested recently.
Thank you! Yes, I have python support enabled. Today, to avoid python version inconsistencies, I tried building paraview with python support enabled. With that, I am able to execute the import statement without error but now I am stuck with another problem. I executed the following code.
from paraview.simple import *
sphere = Sphere(ThetaResolution=32, PhiResolution=32)
rep.Representation = "Surface With Edges"
from ipyparaview.widgets import PVDisplay
disp = PVDisplay(GetActiveView())
w = display(disp) # This line giving error/
Everything is working except the last line, which is giving me the following error in all the major browsers.
I have pasted the error below:
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'PVDisplayModel' from module 'ipyparaview'
It is interesting to note that there is a working render window(see below) popped up in the server.
Hi Thomas! Thanks for your inputs! I was having a higher version than 8.0.0. So I tried pip uninstall ipywidgets and then installed a specific version using pip install ipywidgets==7.7.1. Restarted the machine and the server. Still I get the same error.
Do you know if ipyparaview is no longer supported by NVIDIA? In that case, I don’t wish to continue with ipyparaview.
Do you think I should be using the “IParaView Jupyter Kernel” instead for getting similar visualization features available in jupyter notebooks?
Indeed I think this is worth it to take a look, as it has been tested recently.
The kernel allow you to interact with a pvserver instance, control it and visualize results in the notebook (interactively if you also installed the ipyvtklink optional dependency).