Am 01.02.2016 um 18:32 schrieb Gene Heskett:
> 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:
>> 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
Sorry i forgot that it is "import Tkinter" for your version.

>> root = Tk()
> But fails here:
>>>> root Tk()
>   File "<stdin>", line 1
>     root Tk()
>           ^
> SyntaxError: invalid syntax

Sounds like the Python Tkinter package is missing (python-tk or
python3-tk). Also you must have the Tk package installed for it to work.
But when installing python-tk the dependency for tk should automatically
be selected.

> 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.

Pip only installs python2 packages, for python3 you need pip3.2.
Just do "pip3 install Pillow" and you should have the python3 version of
it. But with the error from python2 i don't think you will get any
further. You need the line root = Tk() to initialize the Tk Framework
before the other commands can be executed.

> 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... 

Hmm that's no good news. One thing you can try is to install the wheezy
version of the python pil packages (apt-get install python-imaging
python-imaging-tk) which should work with the local Tk version. But
before you have to uninstall pillow (pip uninstall Pillow) because they
don't work together.

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