I am trying to run the simple example script located here from the command-line. As I understand it, the
Render() command is supposed to make a window pop up which has a sphere rendered. However, when I run it there is no pop-up window and the only output is
<paraview.servermanager.RenderView at 0x7f0ef6810d30>. I’ve tried to run this with both the
python command and the
pvpython command, neither works. What’s the problem here?
For context I’m running Ubuntu 20.04, python 3.9.7 from Anaconda, and paraview version 5.10.1 from Anaconda.
I have seen this on a Mac, but not on Linux. This is a known problem with them. If you can use a different Linux or Windows you should see it fine.
I don’t understand – are you suggesting I use a different distribution of Linux? If that is the case, it’s not really a tenable option for me to change my operating system to fix this bug. Do you have any other troubleshooting suggestions? It seems like if it works on Linux typically, it should probably work on Ubuntu, as arguably the most well-supported distros.
OK if that is not an option, I would go directly to ParaView.org and download that version. I know I have tried it with Fedora and it works great. And I used a VirtualBox VM of Fedora to use it in. Dose ParaView with the GUI work fine for you? I do understand you would like to use scripting though.
Sort of surprisingly to me, the binaries from here that you suggested actually work perfectly: when I run
pvpython from the bin directory the sphere renders, and when I run the GUI it works great and I can also use the Python terminal in the GUI.
To your question: I installed the GUI via the Ubuntu package manager (i.e.
sudo apt install paraview). The actual GUI functionality works fine out of the box, but it throws an error when I try to use the Python terminal in the GUI (can’t find module paraview.simple). The actual scripting libraries for Paraview I downloaded through Anaconda. Both of these seem like they should work since they actually install it on my system (whereas the binaries just sit in a file somewhere), so I’m not sure what the deal is there.
In any case, thank you for the help and I will have to root around some to figure out why the Anaconda distribution of paraview is not working.
I am glad I could help you out. The official version is the one I pointed you to, so just a piece of advice here, that is where you should get ParaView from in the future. I know there is going to be another release, that has numerous bug fixes and performance improvements in it, within the next few months. And have fun with ParaView, it is a great tool!
just out of curiosity I tried what you have done. but I am using Win10 with Anaconda. So i was running the anaconda paraview.
My first approach was to run paraview and then process the python in the PV python console. it brought up the render view of a sphere with the elements scaled. I was able to save the screenshot.
I also tried from the anaconda powershell command line (activate the correct conda env) and ran “pvpython simple.py”. I got a flash of the rendering which looked correct but it was transient. I guess the python will need a “save image” function for closure.
I cannot see how to attach the PNG. but I guess you will have seen it by now.
sorry I have not got access to Ubuntu but I am hoping to use paraview on this laptop and I have proved i can without admin rights.