How can I run the simple python vtk example from here in pycharm? I've installed vtk version 8.1.2 using pycharm and I'm using python version 3.7.4. Also, I have windows 10.
When I run the example file I get this instead of a 3D cylinder.
ERROR: In C:\VPP\standalone-build\VTK-source\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 685
vtkWin32OpenGLRenderWindow (000001FACEF53880): failed to get wglChoosePixelFormatARB
ERROR: In C:\VPP\standalone-build\VTK-source\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 769
vtkWin32OpenGLRenderWindow (000001FACEF53880): failed to get valid pixel format.
ERROR: In C:\VPP\standalone-build\VTK-source\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 785
vtkWin32OpenGLRenderWindow (000001FACEF53880): GLEW could not be initialized.
To fix this error I've tried updating OpenGL by updating my graphics driver. Everything is up to date. The OpenGL Extensions Viewer 6.0 shows me this:
As requested, these are the packages I have installed along with the version number:
Also as requested, my system path looks like this: (I reformatted it to read easier)
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
C:\Program Files\PuTTY\;
C:\Program Files\Git\cmd;
C:\WINDOWS\System32\OpenSSH\;
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts;
C:\Users\levib\AppData\Local\Programs\Python\Python37\Scripts\;
C:\Users\levib\AppData\Local\Programs\Python\Python37\;
C:\Users\levib\AppData\Local\Microsoft\WindowsApps;;%CLion%
I've tried following the instructions here but it seems that they are for only if you are using Eclipse with Pydev. (See the top of that page) I'm not sure why that would matter that much but regardless I was unable to find anything similar to the directory structure shown in those instructions around where pycharm installed vtk in my files.
I found the GLEW source here but I don't know what I would even do with that.
This is the closest thing to my question but it has no answer.
Please help! I'm not very familiar in this!
Update:
Still, no luck getting it to run. Someone suggested adding VTK\bin to my path variable and I feel like that could be part of the problem as well. But I can't even find any vtk\bin directory! I know I have vtk though because it imports.
I've tried installing vtk in an anaconda environment (miniconda actually if that makes a difference) but that didn't work either. I got this error instead though.
I'm pretty sure my OpenGL version is sufficient but I'm thinking that vtk can't "find" it or something...?
HELP! I'm getting desperate!