一个简单的例子

#! /usr/bin/env python
#coding=utf-8
from tkinter import *
Label(text="Spam").pack()
mainloop()

运行起来却报: no module named tkinter,查了一下,却发现是一个很有趣的原因:

Tkinter (capitalized) refers to versions <3.0.

tkinter (all lowecase) refers to versions ≥3.0

Py2.7 no module named tkinter的更多相关文章

  1. " ModuleNotFoundError: No module named 'tkinter' "的解决方法

    踩坑场景 在使用pillow这个包处理图片的时候,运行程序,报错ModuleNotFoundError: No module named 'tkinter',遇到ModuleNotFoundError ...

  2. Python 2.7 - CentOS 7 - ImportError: No module named Tkinter

    It's simple. sudo yum -y install tkinter Just want to say, "I'm back".

  3. import Tkinter error, no module named tkinter: "Python may not be configured for Tk”

    install required devel module in your linux: yum install tk-devel yum install tcl-devel then,reconfi ...

  4. Matplotlib is currently using agg, which is a non-GUI backend 和 ImportError: No module named 'Tkinter' [closed]

    跑maskrcnn报错:UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot sh ...

  5. ImportError: No module named 'Tkinter' [closed]

    跑maskrcnn报错:UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot sh ...

  6. ImportError: No module named 'tkinter'

    环境说明: windows7.vscode1.33.1.python3.7.0. 解决方案: 通过安装程序单独卸载“tcl/tk and IDLE”------重新安装“tcl/tk and IDLE ...

  7. windows下使用Python出现No module named tkinter.ttk

    1. 编辑工具使用Pycharm,windows平台,运行的时候报错误 2. 目前用的是Python2.7版本,对比了一下已有的库,名字不太一样,因此换成Python3.6的测试一下暂时没这个问题了. ...

  8. 在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the python-tk package

    在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the ...

  9. error: ModuleNotFoundError: No module named 'ConfigParser'

    (env2.7) Kaitlyns-Mac:bin kaitlyn$ pip install MySQL-python Looking in indexes: https://pypi.tuna.ts ...

随机推荐

  1. PHP 将html页面导出至Word

    <?php header("Content-Type: application/msword"); header("Content-Disposition: att ...

  2. Transparent Huge Pages

    在RHEL6中,透明大页功能是默认开启的. 开启该选项后,内核会尽可能地尝试分配大页,如果mmap区域是2mb,那么每个linux进程都会分配到2mb大小的页.如果大页不够用了(比如物理内存不够了), ...

  3. Python 爬虫实例(12)—— python selenium 爬虫

    # coding:utf- from common.contest import * def spider(): url = "http://www.salamoyua.com/es/sub ...

  4. Shell脚本大量示例

     Shell基础之控制流结构 一.控制结构 几乎所有的脚本里都有某种流控制结构,很少有例外.流控制是什么?假定有一个脚本,包含下列几个命令: #!/bin/sh # make a directory ...

  5. 牛腩学ASP.NET CORE做博客(视频)

    牛腩学习ASP.NET CORE做的项目,边学边做. 目录: 01-dotnetcore网站部署到centos7系统上(时长 2:03:16) 02-前期准备及项目搭建 (时长:0:23:35) 03 ...

  6. ios 精简日历

    网上其他人写的日历类功能都很齐全,比较繁杂,对于想看看日历基础实现然后自己绘制日历的我来说不太方便,就自己整理了一个极精简的日历出来,大家看了之后应该能多少理解日历该怎么自定义,很简单. 我的小dem ...

  7. Win7多用户情况下,指定某一用户为自动登陆-解决办法

    转自:http://sbiuggypm.themex.net/archives/605 许久没更新博客了,但从后台可以查看到,有不少朋友还是几乎每天来逛一逛,很对不起的是最近都没更新啥内容.真是不好意 ...

  8. PxCook(像素大厨)

    PxCook(像素大厨)是一款切图设计工具软件.自2.0.0版本开始,支持PSD文件的文字,颜色,距离自动智能识别. 优点在于将标注.切图这两项设计完稿后集成在一个软件内完成,支持Windows和Ma ...

  9. django rest_framework入门

    1.rest_framework的作用 1)可以对orm和非orm资源序列化 2)支持restful风格编程(POST,PUT,PATCH) 3)使用类视图编写API的view,而不是函数视图,类视图 ...

  10. MediaStore insert bitmap为黑色

    MediaStore.Images.Media.insertImage(mFragmentActivity.getContentResolver(), qrBitmap, "xx券面值10元 ...