Trouble importing Paraview 4.4.0 in my Python 2.7.6

I have asked this question on stack overflow but then thought that people here might be a bit more experienced and someone may have had a similar issue:
Question on Stack Overflow
It is well detailed there, I only need to get my paraview running. The reason I use 4.4.0 is because: the export scene from paraview 4 is vectorized while the export from paraview 5 is rasterized. With the switch to the new Opengl version in paraview 5 seems to have dropped the feature of vectorized output. I have both 5.5 and 4.4 and exporting .svg scenes from .stl files works only on my 4.4.0 version.
At first I was using this getting started documentation : Getting Started
But I also found this for older versions but still doesn’t work: Paraview Package - Older Version

Thank you in advance for your help.

It could be a couple of things.

First make sure you are using the 64-bit version of Python (or 32 bit ParaView, but we discontinued those a long time ago). You’ll have to hunt through the downloads page since their default Python download for windows is 32 bit. Based on your ‘not a valid win32 application’ error, I suspect this is the problem.

Then you need to set environment variables (you can set these in your shell before running python if you don’t want to set them globally):
PATH should contain C:\ParaView-4.4.0-Qt4-Windows-64bit\bin. You were trying to do this in Python with sys.path, but the dynamic loader needs it set before the application starts. You may also need the location of the .pyd files (I can’t remember… it has been a few years since I last did this).
PYTHONPATH should contain C:\ParaView-4.4.0-Qt4-Windows-64bit\lib\paraview-4.4\site-packages. You can set this one from inside Python with sys.path.

This should mean you can inport paraview or vtk in your system python assuming the version mismatch doesn’t break anything. In my experience all Python 2.7.X versions are compatible, so you should be fine.

cc: @allison.vacanti Here is another person who is working around the vector graphics thing…

Just to confirm, fully vectorized 3D output is no longer supported in the new OpenGL2 backend. A key feature that the export mechanism relied on was removed from newer versions of OpenGL and is not available in the new backend. There is not a replacement available at the present time.


@allison.vacanti yes you ought to use 4.4.0. It does that much better.I had the newest paraview version 5.5.3 and I stll had an issue exporting SVG scenes.

@shawn.waldon the problem was that Paraview .dll 's are for x64 and my portable python is x86 (win 32) so I had problems reading packages and libraries. On my x64 python 3.4 it all works fine.