Am 31.01.2016 um 23:49 schrieb Gene Heskett:
> On Sunday 31 January 2016 11:34:46 Fox Mulder wrote:
> 
>> Am 31.01.2016 um 16:19 schrieb Gene Heskett:
>>> On Sunday 31 January 2016 07:48:43 Fox Mulder wrote:
>>>> Am 30.01.2016 um 02:10 schrieb Gene Heskett:
>>>>> On Friday 29 January 2016 16:52:58 Gene Heskett wrote:
>>>>>> On Friday 29 January 2016 15:01:16 Fox Mulder wrote:
>>>>>>> Am 29.01.2016 um 04:49 schrieb Gene Heskett:
>>>>>>>> On Tuesday 26 January 2016 14:16:03 Gene Heskett wrote:
>>>>>>>>> On Tuesday 26 January 2016 12:41:26 Fox Mulder wrote:
>>>>>>>>>> Am 26.01.2016 um 18:00 schrieb Gene Heskett:
>>>>>>>>>>> On Tuesday 26 January 2016 09:55:33 Fox Mulder wrote:
>>>>>>>>>>>> Am 26.01.2016 um 13:20 schrieb Gene Heskett:
>>>>
>>>> Here is the new script which needs a few new python packages
>>>> installed. For me in debian it was python3-pil,
>>>> python3-pil.imagetk, python3-tk.
>>>
>>> I hope they are available in wheezy.  Checking now.  The first 2 are
>>> not. 3.2.3 Compatible deb's?  URL IOW. python3-tk now installed.
>>
>> Best way for you would be to use python2 where these packages would be
>> called python-imaging and python-imaging-tk. I think wheezy doesn't
>> have these packages for python3 included.
>>
>> Alternatively you could try and use python pip to install these
>> packages for python3.
>>
>>From the pypi sites web server, pillow (a fork of PIL) is recommended to 
> replace PIL.
I replaced PIL with latest pillow 3.1.0 with pip3 and it works without
changing anything in the code.

> So I have installed that and now get to line 6 with python2, can't find 
> tkinter *.  It is not installed & not available.
> 
> Uppercased the name to Tkinter, and I did get it to run, and it opens a 
> white screen with the menu stuff but no video.
That's a problem with package renaming (Tkinter to tkinter) between some
older and newer packages. Don't know who thought that would be a good
idea. :/

> Trace from the launching screen:
> 
> gene@GO704:~/linuxcnc$ python python_opencv_camera_example_with_gui.py
> 
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in __call__
>     return self.func(*args)
>   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 498, in callit
>     func(*args)
>   File "python_opencv_camera_example_with_gui.py", line 92, in show_video
>     imgtk = ImageTk.PhotoImage(image=img)
>   File "/usr/local/lib/python2.7/dist-packages/PIL/ImageTk.py", line 115, 
> in __init__
>     self.paste(image)
>   File "/usr/local/lib/python2.7/dist-packages/PIL/ImageTk.py", line 180, 
> in paste
>     from PIL import _imagingtk
> ImportError: cannot import name _imagingtk
You can try the relevant lines in an interactive python shell to see if
they work. Just start "python" (for python 2) or "python3" and try the
following lines (change the picture and path to an existing one):

from PIL import Image as pilimg
from PIL import ImageTk
from tkinter import *
root = Tk()
img = pilimg.open('/temp/picture.png')
imgtk = ImageTk.PhotoImage(img)

If you got an error you can see after which line it comes. This maybe
help to find the problem.

> And with my lack of python knowledge, no clue how it got renamed with the 
> leading _.
> 
> With pillow installed, locate says:
> 
> gene@GO704:~/linuxcnc$ locate imagingtk
> /usr/lib/pyshared/python2.6/PIL/_imagingtk.so
> /usr/lib/pyshared/python2.7/PIL/_imagingtk.so
> /usr/lib/python2.6/dist-packages/PIL/_imagingtk.so
> /usr/lib/python2.7/dist-packages/PIL/_imagingtk.so
> 
> Subtle syntax error? ENV path? Obviously IDK.
The names of the .so libraries on the harddisk doesn't matter. It's
normal that they have an underscore in front, same here on my installation.

Ciao,
     Rainer

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to