On Monday 01 February 2016 05:46:16 Fox Mulder wrote: > 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 * Fails here gene@GO704:~/linuxcnc/configs/GO704fast$ python Python 2.7.3 (default, Mar 14 2014, 11:57:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from PIL import Image as pilimg >>> from PIL import ImageTk >>> from tkinter import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named tkinter
But from Tkinter import * works > root = Tk() But fails here: >>> root Tk() File "<stdin>", line 1 root Tk() ^ SyntaxError: invalid syntax No use continueing, try python3 > img = pilimg.open('/temp/picture.png') > imgtk = ImageTk.PhotoImage(img) When running python3 shell: gene@GO704:~/linuxcnc/configs/GO704fast$ python3 Python 3.2.3 (default, Feb 20 2013, 17:02:41) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from PIL import Image as pilimg Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named PIL I THOUGHT pillow built and installed itself in both paths. But from locates response, only for 2.6 and 2.7. I'll google for it again, and see if there is a pip3 utility. Humm, but first, need pip3. But its pip-3.2, not pip3, so its munching its way thru a python3 install of pillow. Now it should be there, but again the install bitched about a missing tkinter, needs Tcl/Tk-8.5 libraries and wheezy only has 8.4. This is wearing thin... > 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 Thanks Rainer. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ 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