<div dir="ltr"><div>Hi Charles,</div><div><br></div><div>Try running 'vtkpython' from your build tree (i.e. perhaps the build was fine, and it was just the "install" that put the python modules in the wrong place).</div><div><br></div><div>For troubleshooting, use "find" to locate vtkCommonCorePython.so and vtkCommonCore.py and make sure they're in python's path:</div><div><br></div><div>e.g. cd to build tree and</div><div>find . -name vtkCommonCorePython.so</div><div>find . -name vtkCommonCore.py<br></div><div><br></div><div>Then do the same in your install prefix to find out where "make install" put them. You might have to copy them to lib/python3.5/site-packages, or set your PYTHONPATH before running vtkpython.</div><div><br></div><div>It's odd that you say you can use it from the system's python2.7. Obviously, binary modules built for python3 will not work with python2, but when you run 'vtkpython' it clearly reports that VTK was built against python3. I have to ask, are you sure that the "vtk" that you import from python2 is the one that you just built? Because it seems fishy to me. Be sure to do a "print(vtk.__file__)" after you import vtk, so that you know where the module came from.</div><div><br></div><div> - David</div><div><br></div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 3:49 AM, Charles Kind <span dir="ltr"><<a href="mailto:charles.kind@bristol.ac.uk" target="_blank">charles.kind@bristol.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am running ubuntu 16.04. I build vtk with VTK_PYTHON_VERSION=3 and<br>
VTK_WRAP_PYTHON=ON. Once built and installed it only runs from the system<br>
Python 2.7.12. Even if I run vtkpython I get:<br>
<br>
*******@********:~/Downloads/<wbr>a/vtkBuild$ vtkpython<br>
vtk version 8.0.1<br>
Python 3.5.2 (default, Nov 23 2017, 16:37:01)<br>
[GCC 5.4.0 20160609] on linux<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import vtk<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
ImportError: No module named 'vtk'<br>
<br>
Help!!<br>
<br>
I do have Enthought Canopy on the same system, running VTK from python 3.5,<br>
but not running when I do the ccmake, make and install for vtk8.0.1. Could<br>
this be the problem, I am a little fearful of removing it right now as I am<br>
producing work for an imminent paper and need my code working.<br>
<br>
Thanks in advance for any help.<br></blockquote></div></div></div>