Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python中的Tkinter-未找到_Python_Python 2.7_Tkinter - Fatal编程技术网

python中的Tkinter-未找到

python中的Tkinter-未找到,python,python-2.7,tkinter,Python,Python 2.7,Tkinter,我想在Python2.7中使用tkinter,但它说,找不到。我也不能用pip安装。如何安装 Python 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter Traceba

我想在Python2.7中使用tkinter,但它说,找不到。我也不能用pip安装。如何安装

Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named tkinter

>>> import Tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Tkinter
>>>



pip install tkinter
Collecting tkinter
  Could not find a version that satisfies the requirement tkinter (from versions: )
No matching distribution found for tkinter


 pip install Tkinter
Collecting Tkinter
  Could not find a version that satisfies the requirement Tkinter (from versions: )
No matching distribution found for Tkinter
Python 2.7.5(默认,2016年11月6日00:28:07)
[GCC 4.8.5 20150623(Red Hat 4.8.5-11)]关于linux2
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口tkinter
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为tkinter的模块
>>>进口Tkinter
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为Tkinter的模块
>>>
pip安装tkinter
集束器
找不到满足tkinter要求的版本(来自版本:)
找不到tkinter的匹配分布
pip安装Tkinter
集束器
找不到满足Tkinter要求的版本(来自版本:)
找不到Tkinter的匹配分布
您需要安装软件包:

apt install python-tk

您是否收到有关pip版本的任何警告?您无法使用pip安装tkinter