ubuntu下使用python3的有些库时,解决"raise ImportError(str(msg) + ', please install the python3-tk package') ImportError: No module named '_tkinter', please install the python3-tk package"的错误
问题:
在Ubuntu下使用matplotlib这个库时,运行时出现如下错误:
raise ImportError(str(msg) + ', please install the python3-tk package')
ImportError: No module named '_tkinter', please install the python3-tk package
原因:
从错误提示我们可以看到原因是:是由于python的版本没有包含tkinter的模块,只需要把tk的package安装就可以了。
解决方案:
终端输入命令进行安装:
sudo apt-get install python3-tk
再次运行,就会发现没有错误了。
ubuntu下使用python3的有些库时,解决"raise ImportError(str(msg) + ', please install the python3-tk package') ImportError: No module named '_tkinter', please install the python3-tk package"的错误的更多相关文章
- ImportError: No module named _tkinter, please install the python-tk package ubuntu运行tkinter错误
这是由于Python的版本没有包含tkinter的模块,只需要把tk的package安装就可以了. 一般在Linux才出现,windows版本一般已经包含了tkinter模块. apt-get ins ...
- Ubuntu环境下No module named '_tkinter'错误的解决
在Ubuntu环境下运行下面代码: import matplotlib as plt 出现以下错误: No module named '_tkinter' 解决方法: sudo apt-get ins ...
- Ubuntu下 QT添加外部链接库(.so文件)示例
参考:https://blog.csdn.net/KKALL1314/article/details/81915354 https://forum.qt.io/topic/80301/file-not ...
- ubuntu 下编译glew (opengl扩展库)
最近在研究咋样在QT 下使用opengl 扩展库glew.首先需要明白的是QT中对glut等库进行了封装,但是对glew和glfw等库需要自己编译后使用. 安装步骤: 1.下载Ubuntu下的glew ...
- 我在 Ubuntu 下使用 Sublime 编写 python 代码时遇到并解决的问题
Ubuntu 下 Sublime 无法输入中文 解决方法如下: sudo apt-get update && sudo apt-get upgrade 克隆项目到本地 : git cl ...
- 【Linux】CentOS6上安装Python3.7(config、make、make install)及“No module named '_ctypes'”/pip install时“ssl module in Python is not available.”的解决
1.下载安装包 https://www.python.org/ftp/python/ 该目录下选择所需要的版本进行下载.解压. wget https://www.python.org/ftp/pyth ...
- ubuntu下mysql提示Changed limits: max_open_files:1024解决办法
在配置我的md5解密网站cmd5.la的时候,mysql5.7出现了max_open_files: 1024, max_connections: 214,warning: Changed limits ...
- Ubuntu下通过makefile生成静态库和动态库简单实例
本文转自http://blog.csdn.net/fengbingchun/article/details/17994489 Ubuntu环境:14.04 首先创建一个test_makefile_gc ...
- Windows下使用Python的Curses库时 No module named _curses问题
这个问题产生的 根本原因 是 curses 库不支持 windows.所以我们在下载完成python后(python 是自带 curses 库的),虽然在 python目录\Lib 中可以看到 c ...
随机推荐
- JS - ECMAScript2015(ES6)新特性
友情提示:本文仅mark几个常用的新特性,详细请参见:ES6入门 - ryf: 碎片 var VS let VS const var:声明全局变量, let:声明块级变量,即局部变量 const:声明 ...
- ubuntu 下更新pip后发生 ImportError: cannot import name 'main'的问题解决
今天刚使用ubuntu 由于安装的是pip 8的版本,我感觉pip版本有些低就随手将将pip更新了,刚新到pip 10版本的,没想到刚更新完就报错了, 发生 ImportError: cannot i ...
- (转) python学习笔记6--fraction
原文:https://blog.csdn.net/lemonwyc/article/details/37592883 fraction模块提供有关有理数的算术表达和计算,实际上就是分数的表达和计算.p ...
- 使用canvas绘制渐变色矩形和使用按键控制人物移动
使用canvas绘制渐变色矩形和使用按键控制人物移动 1.使用canvas绘制渐变色矩形 效果演示 相关代码: <!DOCTYPE html> <html lang="en ...
- Postman—命令执行脚本及生成报告
前言 前面的应用中,都是在postman图形界面工具里面进行测试,但是有时候我们需要把测试脚本集成到CI平台,或者在非图形界面的系统环境下进行测试,那么我们该如果处理呢 通过newman来执行post ...
- JPA主键生成策略
@GeneratedValue: 为一个实体类生成一个唯一标识的主键(JPA要求每一个实体Entity,必须有且只有一个主键).它有两个属性,分别是strategy和generator. genera ...
- NoSQL之HBase
http://www.cnblogs.com/LBSer/p/3330383.html 9月初淘宝飞芃做了一个关于HBase的分享,讲的激情飞扬,让听众收益匪浅,现做下简单总结. HBase是一个No ...
- Automapper问题记录
在Automapper使用中会碰到一些未能映射或者错误的问题,这些问题可能会经常忘记如何处理,想到一些就记录一些: 映射值有时为空又不报错的情况 这很可能是由于目标类中的部分属性有问题导致的,最简单的 ...
- It is likely that the remote side declared peer gone on this JVM
java.net.ConnectException: t3://host:port: Bootstrap to host/host:port failed. It is likely that the ...
- [转]Configure Network Drive Visible for SQL Server During Backup and Restore Using SSMS
本文转自:https://mytechmantra.com/LearnSQLServer/Configure-Network-Drive-Visible-for-SQL-Server-During-B ...