Python Tkinter library installation-Debian

Source: Internet
Author: User
Python Tkinter library installation-Debian-Linux Release Technology-Debian information, the following is a detailed description. Tkinter is a Python GUI widget.

In general, Linux does not come with it. You must install it on your own.

1. Confirm that Tkinter is not installed:
Zhancang @ debian :~ $ Python
Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> Import Tkinter
Traceback (most recent call last ):
File" ", Line 1, in?
File "/usr/lib/python2.4/lib-tk/Tkinter. py", line 41, in?
Raise ImportError, str (msg) + ', please install the python-tk package'
ImportError: No module named _ tkinter, please install the python-tk package
>>>

2. Install Tkinter:
Zhancang @ debian :~ $ Su-
Password:
Debian :~ # Aptitude install python-tk
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be automatically installed:
Blt tk8.4
The following NEW packages will be installed:
Blt python-tk tk8.4
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 2565kB of archives. After unpacking 6676kB will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Done
Get: 1 http://debian.cn99.com etch/main tk8.4 8.4.12-1etch2 [978kB]
Get: 2 http://debian.cn99.com etch/main blt 2.4z-4 [1528kB]
Get: 3 http://debian.cn99.com etch/main python-tk 2.4.4-1 [59.4kB]
Fetched 2565kB in 2 s (918kB/s)
Selecting previusly deselected package tk8.4.
(Reading database... 72536 files and directories currently installed .)
Unpacking tk8.4 (from.../tk8.4 _ 8.4.12-1etch2_i386.deb )...
Selecting previusly deselected package blt.
Unpacking blt (from.../archives/blt_2.4z-4_i386.deb )...
Selecting previusly deselected package python-tk.
Unpacking python-tk (from.../python-tk_2.4.4-1_i386.deb )...
Setting up tk8.4 (8.4.12-1etch2 )...

Setting up blt (2.4z-4 )...

Setting up python-tk (2.4.4-1 )...
Debian :~ #

3. Installation successful:
Zhancang @ debian :~ $ Python
Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> Import Tkinter
>>>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.