<div dir="ltr"><div>If vtkpython works for you, then check to see where it is finding its files:</div><div><br></div><div>import vtk</div><div>print(vtk.__file__)</div><div>import vtkCommonCorePython</div><div>print(vtkCommonCorePython.__file__)</div><div><br></div><div>The "make install" might not copy the python modules into site-packages,</div><div>so you might have to copy them yourself. My own experience with VTK's</div><div>"make install" is limited, I always use VTK from the build directory.</div><div><br></div><div>Cheers,</div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 10:42 AM, Ranveer Aggarwal <span dir="ltr"><<a href="mailto:ranveeraggarwal@gmail.com" target="_blank">ranveeraggarwal@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I guess the `make install` didn't work as expected. Is there anything else I'm supposed to do after make install?</div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, 4 Mar 2016 at 23:12 Ranveer Aggarwal <<a href="mailto:ranveeraggarwal@gmail.com" target="_blank">ranveeraggarwal@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">When I use the vtkpython executable and do an `import vtk`, it works.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, 4 Mar 2016 at 23:05 David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You should also try the executable that VTK built (bin/vtkpython) to see if it gives a different result from running python3 directly.</div><div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 10:31 AM, Ranveer Aggarwal <span dir="ltr"><<a href="mailto:ranveeraggarwal@gmail.com" target="_blank">ranveeraggarwal@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>I looked all over CMakeCache.txt and didn't find any instance of "python2". </div><div>Any other possible fix?</div><div><br></div><div>If not, I'll try Bernard's solution. </div><div><br></div><div>Thanks for your suggestions :)</div></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, 4 Mar 2016 at 19:05 David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Ranveer,<div><br></div><div>The error "PyThreadState_Get: no current thread" almost always means that VTK was linked to the wrong version of Python. I know you said that you checked this, but I recommend that you load CMakeCache.txt into a text editor and do a thorough search to make sure that "python2" does not appear anywhere. My own OS X system builds VTK against Python 3.5.</div><div><br></div><div></div></div><div dir="ltr"><div> - David</div></div><div dir="ltr"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 12:25 AM, Ranveer Aggarwal <span dir="ltr"><<a href="mailto:ranveeraggarwal@gmail.com" target="_blank">ranveeraggarwal@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>I have been struggling with this problem for quite some time now. Here's what I did.</div><div><br></div><div>1. Downloaded source tar.gz and untarred it.</div><div>2. Went to the downloaded folder and made a build folder and ran ccmake .. in it.</div><div>3. Set Python Wrapping to on and set Python version as 3.5. Went to advanced options and appropriately set all the Python 3.5 libraries.</div><div>4. Generated the cmake and ran it.</div><div>5. Ran make and then make install</div><div>6. Added "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/" to PYTHONPATH.</div><div><br></div><div>Now, when I run python3 and do an `import vtk`, I get </div><div><br></div><div><div>Fatal Python error: PyThreadState_Get: no current thread</div><div>Segmentation fault: 11</div></div><div><br></div><div>and Python crashes. Any idea why this could be happening? Any help would be highly appreciated.</div></div><span><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">Sincerely,<br>
Ranveer Aggarwal<br>Indian Institute of Technology, Bombay<br>
<a href="http://ranveeraggarwal.com" target="_blank">http://ranveeraggarwal.com</a></p></div></font></span></blockquote></div></div></div></div></blockquote></div><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">Sincerely,<br>
Ranveer Aggarwal<br>Indian Institute of Technology, Bombay<br>
<a href="http://ranveeraggarwal.com" target="_blank">http://ranveeraggarwal.com</a><br>
</p>
</div>
</div></div></blockquote></div><br></div></div></div></blockquote></div><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">Sincerely,<br>
Ranveer Aggarwal<br>Indian Institute of Technology, Bombay<br>
<a href="http://ranveeraggarwal.com" target="_blank">http://ranveeraggarwal.com</a><br>
</p>
</div></blockquote></div><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">Sincerely,<br>
Ranveer Aggarwal<br>Indian Institute of Technology, Bombay<br>
<a href="http://ranveeraggarwal.com" target="_blank">http://ranveeraggarwal.com</a><br>
</p>
</div>
</div></div></blockquote></div><br></div></div>