Discussion:
[Tkinter-discuss] how to use tkinter in python3.2
contro opinion
2012-07-01 06:52:55 UTC
Permalink
1.i have installed tk
2.install python3.1 and python3.2 the sameway
1)download
2)./configure
3)make
4)make install

in my console


tiger at ocean:~$ python3.2
Python 3.2.3 (default, Jul 1 2012, 11:07:14)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
tiger at ocean:~$ python3.1
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
what is the matter?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120701/f2250b59/attachment.html>
psao pollard-flamand
2012-07-01 09:22:31 UTC
Permalink
The module name is Tkinter not tkinter...
________________________________
From: contro opinion
Sent: 30/06/2012 11:53 PM
To: Tkinter-discuss
Subject: [Tkinter-discuss] how to use tkinter in python3.2

1.i have installed tk
2.install python3.1 and python3.2 the sameway
1)download
2)./configure
3)make
4)make install

in my console


tiger at ocean:~$ python3.2
Python 3.2.3 (default, Jul 1 2012, 11:07:14)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
tiger at ocean:~$ python3.1
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
what is the matter?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120701/21bfe54d/attachment.html>
-------------- next part --------------
Michael Lange
2012-07-01 11:08:59 UTC
Permalink
Thus spoketh psao pollard-flamand <psaoflamand at live.com>
Post by psao pollard-flamand
The module name is Tkinter not tkinter...
Not in Python3, tkinter is correct.
Post by psao pollard-flamand
________________________________
From: contro opinion
Sent: 30/06/2012 11:53 PM
To: Tkinter-discuss
Subject: [Tkinter-discuss] how to use tkinter in python3.2
1.i have installed tk
2.install python3.1 and python3.2 the sameway
1)download
2)./configure
3)make
4)make install
in my console
tiger at ocean:~$ python3.2
Python 3.2.3 (default, Jul 1 2012, 11:07:14)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in
<module> import _tkinter # If this fails your Python may not be
configured for Tk ImportError: No module named _tkinter
tiger at ocean:~$ python3.1
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
what is the matter?
Apparently in Python-3.2 ./configure failed to detect the Tcl/Tk install.
Maybe something on your system was changed in between the install of 3.1
and 3.2 ?
We had a similar discussion here a while ago:
http://mail.python.org/pipermail/tkinter-discuss/2012-June/003203.html

Unfortunately there do not seem to be much resources helping with these
kind of problems, I encountered them myself, too, and never came to a
really satisfying solution.
If ./configure fails to find tcl/tk while all the libs and header files
are properly installed, usually the paths pointing to tclConfig.sh and
tkConfig.sh must be added to some environment variable like
LD_LIBRARY_PATH or LIBDIR , maybe the the paths to tcl.h and tk.h must
also be explicitely added to some other environment variable.
Alas there does not seem to be the one solution that works in any case,
at least I never saw it.

Regards

Michael


.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.

You're too beautiful to ignore. Too much woman.
-- Kirk to Yeoman Rand, "The Enemy Within", stardate
unknown
Michael O'Donnell
2012-07-01 22:38:14 UTC
Permalink
Try installing the ActivePython installation, and which has
TCL/TK installed. They do not need to be installed separately
in any case, both the ActivePython and official releases include
all libraries needed for tkinter.

Mick
Post by Michael Lange
Thus spoketh psao pollard-flamand <psaoflamand at live.com>
Post by psao pollard-flamand
The module name is Tkinter not tkinter...
Not in Python3, tkinter is correct.
Post by psao pollard-flamand
________________________________
From: contro opinion
Sent: 30/06/2012 11:53 PM
To: Tkinter-discuss
Subject: [Tkinter-discuss] how to use tkinter in python3.2
1.i have installed tk
2.install python3.1 and python3.2 the sameway
1)download
2)./configure
3)make
4)make install
in my console
tiger at ocean:~$ python3.2
Python 3.2.3 (default, Jul 1 2012, 11:07:14)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in
<module> import _tkinter # If this fails your Python may not be
configured for Tk ImportError: No module named _tkinter
tiger at ocean:~$ python3.1
Python 3.1.3 (r313:86834, Nov 28 2010, 11:28:10)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tkinter
what is the matter?
Apparently in Python-3.2 ./configure failed to detect the Tcl/Tk install.
Maybe something on your system was changed in between the install of 3.1
and 3.2 ?
http://mail.python.org/pipermail/tkinter-discuss/2012-June/003203.html
Unfortunately there do not seem to be much resources helping with these
kind of problems, I encountered them myself, too, and never came to a
really satisfying solution.
If ./configure fails to find tcl/tk while all the libs and header files
are properly installed, usually the paths pointing to tclConfig.sh and
tkConfig.sh must be added to some environment variable like
LD_LIBRARY_PATH or LIBDIR , maybe the the paths to tcl.h and tk.h must
also be explicitely added to some other environment variable.
Alas there does not seem to be the one solution that works in any case,
at least I never saw it.
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
You're too beautiful to ignore. Too much woman.
-- Kirk to Yeoman Rand, "The Enemy Within", stardate
unknown
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
--
Not sent from my iPhone
Loading...