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 ...
随机推荐
- git aliases
单独的 alias git config --global alias.co checkout git config --global alias.br branch git config --glo ...
- yii2之ActiveForm表单使用
因目前项目并非前后端分离模式,且用到PHP的yii2框架(所有html代码,js较多内嵌在.php文件内多少采用同步提交[喷墨中...]),遂对于前端面上需要用到的yii2小组件一些整理(因是前端若涉 ...
- MySQL权限管理(五)
一.什么是MySQL权限 各大帖子及文章都会讲到数据库的权限按最小权限为原则,这句话本身没有错,但是却是一句空话.因为最小权限,这个东西太抽象,很多时候你并弄不清楚具体他需要哪些权限. 现在很多mys ...
- js时间的应用(再看看前面,会发现不一样的)
1.年份(1970-) 获取 date.getFullYear(); 设置 date.setFullYear(2016); 2.月份(0-11) 0代表1月 获取 date.getMonth() 设置 ...
- J04-Java IO流总结四 《 FileReader和FileWriter 》
FileReader和FileWriter的源码相对简单,下面通过分析它们的源码以更好地进行理解这两个流 1. FileReader FileReader实现了读取底层的字节数据并将其转换为字符数据的 ...
- windows下python3.6版本安装pygame
参考:http://blog.csdn.net/a380331382/article/details/77063152 首先,进入这个网站:http://www.lfd.uci.edu/~gohlke ...
- Vue的Computed的使用
Vue的Computed的使用 相关Html: <!DOCTYPE html> <html lang="en"> <head> <meta ...
- 【Java并发编程】:加锁和volatile变量
加锁和volatile变量两者之间的区别: 1.volatile变量是一种稍弱的同步机制在访问volatile变量时不会执行加锁操作,因此也就不会使执行线程阻塞,因此volatile变量是一种比syn ...
- Python -- Gui编程 -- Qt库的使用 -- 菜单与对话框
1.菜单 import sys from PyQt4 import QtCore, QtGui class MyWindow(QtGui.QMainWindow): def __init__(self ...
- Phoenix 4.8
From v4.8.0 onwards, user can enable to map it’s schema to the namespace so that any table created w ...