Discussion:
[Pydev-users] Problem getting tkinter to be recognized by PyDev
LUGG, WILLIAM H III GS-13 USAF AFMC 517 SMXS/MXDEC
2015-08-13 15:04:53 UTC
Permalink
I'm using PyDev 3.8.0 (yes, it's a little out of date) in Eclipse Luna (also a little out of date). I'm attempting to learn Python and GUI programming using tkinter, but am having a problem where PyDev is reporting an unresolved import for tkinter. I have included /usr/lib/local/python3.3/tkinter in the Windows | Preferences | Python Interpreters | Libraries | System PYTHONPATH dialog, but that doesn't seem to make a difference. Strangely enough, the simple code I've written does run, even with the error reported by Eclipse, but I'm not getting any code completion help or the other benefits of using the IDE with tkinter.

Can someone help me understand how to make this error go away?

Thanks.
Bill Lugg


------------------------------------------------------------------------------
Fabio Zadrozny
2015-08-13 17:22:12 UTC
Permalink
You shouldn't need to add /usr/lib/local/python3.3/tkinter to the
PYTHONPATH (only /usr/lib/local/python3.3/ should be there). Have you tried
adding tkinter to the forced builtins? (see:
http://www.pydev.org/manual_101_interpreter.html for details on 'forced
builtins').

Cheers,

Fabio

On Thu, Aug 13, 2015 at 12:04 PM, LUGG, WILLIAM H III GS-13 USAF AFMC 517
Post by LUGG, WILLIAM H III GS-13 USAF AFMC 517 SMXS/MXDEC
I'm using PyDev 3.8.0 (yes, it's a little out of date) in Eclipse Luna
(also a little out of date). I'm attempting to learn Python and GUI
programming using tkinter, but am having a problem where PyDev is reporting
an unresolved import for tkinter. I have included
/usr/lib/local/python3.3/tkinter in the Windows | Preferences | Python
Interpreters | Libraries | System PYTHONPATH dialog, but that doesn't seem
to make a difference. Strangely enough, the simple code I've written does
run, even with the error reported by Eclipse, but I'm not getting any code
completion help or the other benefits of using the IDE with tkinter.
Can someone help me understand how to make this error go away?
Thanks.
Bill Lugg
------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
https://lists.sourceforge.net/lists/listinfo/pydev-users
LUGG, WILLIAM H III GS-13 USAF AFMC 517 SMXS/MXDEC
2015-08-17 18:53:59 UTC
Permalink
Sure enough, I added the string tkinter to the forced builtins section, exited and restarted Eclipse and everything works now.

Thanks for the pointer.
----
Bill Lugg ΙΧΘΥΣ
Software Engineer,
Milstar AF Command Post Terminal Support
517 SMXS/MXDEC, Peterson AFB, CO

Some trust in chariots and some in horses, but I trust in the name of the LORD my God.


-----Original Message-----
From: Fabio Zadrozny [mailto:***@gmail.com]
Sent: Thursday, August 13, 2015 11:22 AM
To: pydev-***@lists.sourceforge.net
Subject: Re: [Pydev-users] Problem getting tkinter to be recognized by PyDev

You shouldn't need to add /usr/lib/local/python3.3/tkinter to the PYTHONPATH (only /usr/lib/local/python3.3/ should be there). Have you tried adding tkinter to the forced builtins? (see: http://www.pydev.org/manual_101_interpreter.html for details on 'forced builtins').


Cheers,


Fabio


On Thu, Aug 13, 2015 at 12:04 PM, LUGG, WILLIAM H III GS-13 USAF AFMC 517 SMXS/MXDEC <***@us.af.mil> wrote:


I'm using PyDev 3.8.0 (yes, it's a little out of date) in Eclipse Luna (also a little out of date). I'm attempting to learn Python and GUI programming using tkinter, but am having a problem where PyDev is reporting an unresolved import for tkinter. I have included /usr/lib/local/python3.3/tkinter in the Windows | Preferences | Python Interpreters | Libraries | System PYTHONPATH dialog, but that doesn't seem to make a difference. Strangely enough, the simple code I've written does run, even with the error reported by Eclipse, but I'm not getting any code completion help or the other benefits of using the IDE with tkinter.

Can someone help me understand how to make this error go away?

Thanks.
Bill Lugg


------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users



------------------------------------------------------------------------------
gustavk
2015-08-14 00:50:23 UTC
Permalink
I've got the same type of problem:
see my thread here:
http://comments.gmane.org/gmane.comp.ide.eclipse.plugins.pydev.user/5502

Is the import concerning a .so files?

Maybe look at this thread also on SO:
http://stackoverflow.com/questions/4631377/unresolved-import-issues-with-pydev-and-eclipse

Let us now if you solve your problem since I'd like to solve mine too...





------------------------------------------------------------------------------
Loading...