[vtkusers] Vtk 6.1 Standalone Python Interface (Installer) Windows pyd files in wrong location

Diego Andres Angulo Pabon da.angulo39 at uniandes.edu.co
Wed Jan 15 15:28:04 EST 2014


Thanks a lot


I filed the bug with the following id

http://www.vtk.org/Bug/view.php?id=14517


________________________________
De: David E DeMarle <dave.demarle at kitware.com>
Enviado: miércoles, 15 de enero de 2014 12:05 p. m.
Para: Diego Andres Angulo Pabon
Cc: vtkusers at vtk.org
Asunto: Re: [vtkusers] Vtk 6.1 Standalone Python Interface (Installer) Windows pyd files in wrong location

* The C:\Program Files vs vs C:\Program Files (x86) should be fixed with rc2.

* I've moved the vtk modules under bin in rc2.

* The root of the issue is that I am not packaging Tk, and thus the Tk dependent parts of VTK such as vtkRenderingPythonTkWidgets-6.1.dll are not available. File a bug report and with enough interest I'll see if I can get that done for 6.2.

thanks again for the valuable feedback,

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Mon, Jan 13, 2014 at 10:19 AM, diego0020 <da.angulo39 at uniandes.edu.co<mailto:da.angulo39 at uniandes.edu.co>> wrote:
I didn't get the last message in my inbox, just resending

diego0020 wrote
> Thanks for your reply
>
> I found some other problems when trying to use Tkinter using the
> installer. I tried with the included interpreter and with the offiial
> python interpreter
>
> Using the included interpreter, when I type
>>>> import vtk
>>>> from vtk.tk.vtkTkRenderWindowInteractor import
>>>> vtkTkRenderWindowInteractor
>
> It fails with the following error:
>
> Traceback (most recent call last):
>   File "
> <stdin>
> ", line 1, in
> <module>
>   File "C:\Program Files (x86)\VTK
> 6.1.0-RC1\lib\site-packages\vtk\tk\vtkTkRenderWindowInteractor.py", line
> 12, in
> <module>
>     import Tkinter
>   File "C:\Program Files (x86)\VTK 6.1.0-RC1\bin\lib\lib-tk\Tkinter.py",
> line 39, in
> <module>
>     import _tkinter # If this fails your Python may not be configured for
> Tk
> ImportError: No module named _tkinter
>
> I think the problem is in the file FixTk.py, whih tries to look for tk
> inside
> sys.prefix = 'C:\\Program Files (x86)\\VTK 6.1.0-RC1\\bin'
>
> But I couldn't understand it very well
>
> ========================================================
>
> -Using the official interpreter with the installer's bin directory in PATH
> and with
> PYTHONPATH=C:\Program Files (x86)\VTK 6.1.0-RC1\bin;C:\Program Files
> (x86)\VTK 6.1.0-RC1\lib\site-packages
>>> import vtk
>>> from vtk.tk.vtkTkRenderWindowInteractor import
>>> vtkTkRenderWindowInteractor
>
> works now, but when I attempt to call
>>> render_widget = vtkTkRenderWindowInteractor(top ,width=600, height=600)
> I get the following error
>
> TclError                                  Traceback (most recent call
> last)
> <ipython-input-8-75725e72815c>
>  in
> <module>
> ()
>       1 render_widget = vtkTkRenderWindowInteractor(top
>       2                                             ,width=600,
> ----> 3                                             height=600)
>
> C:\Program Files (x86)\VTK
> 6.1.0-RC1\lib\site-packages\vtk\tk\vtkTkRenderWindowInteractor.py in
> __init__(self, master, cnf, **kw)
>      46         """
>      47         # load the necessary extensions into tk
> ---> 48         vtkLoadPythonTkWidgets(master.tk<http://master.tk>)
>      49
>      50         try: # check to see if a render window was specified
>
> C:\Program Files (x86)\VTK
> 6.1.0-RC1\lib\site-packages\vtk\tk\vtkLoadPythonTkWidgets.pyc in
> vtkLoadPythonTkWidgets(interp)
>      71
>      72     # re-generate the error
> ---> 73     interp.call('load', filename, pkgname)
>
> TclError: couldn't load library "vtkRenderingPythonTkWidgets-6.1.dll":
> this library or a dependent library could not be found in library path
>
>
> I checked, and in fact the file "vtkRenderingPythonTkWidgets-6.1.dll" is
> not included in the installer. This file is however built when generating
> vtk from source. When I built from source I used tck/tk version 8.5.
>
> I did the experiment of copying "vtkRenderingPythonTkWidgets-6.1.dll" from
> my source build to the installer's bin directory and it worked!!!
>
> ============================
>
> A complete example of vtk and tkinter can be found in
> http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Python/ImagePlaneWidget.py
>
> Thanks for all the hard work, and please let me know if there is something
> else I can do to help
>
> best regards





--
View this message in context: http://vtk.1045678.n5.nabble.com/Vtk-6-1-Standalone-Python-Interface-Installer-Windows-pyd-files-in-wrong-location-tp5725312p5725346.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140115/4e8cd698/attachment.html>


More information about the vtkusers mailing list