python - matplotlib安装之后使用出错
问题描述
产生错误:
ImportError: No module named ’_tkinter’, please install the python3-tk package
在网上找到的解决方法是安装 python3-tk包:
但是在我使用的 ubuntu17.04 中找不到这个包,求解决办法?
问题解答
回答1:你把更新源换一下,然后重新试一下,换成国内阿里或者其它的。
命令行:先备份sudo /etc/apt/sources.list /etc/apt/sources.list.bak然后编辑 sudo gedit /etc/apt/sources.list把以下内容放进去替换掉原来的源
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse##测试版源deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse# 源码deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse##测试版源deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse# Canonical 合作伙伴和附加deb http://archive.canonical.com/ubuntu/ xenial partnerdeb http://extras.ubuntu.com/ubuntu/ xenial main
save保存命令行:sudo apt-get updatesudo apt-get upgradesudo apt-get install python3-tk
相关文章:
1. bootstrp是col-md-12列的,只有col-md-10有内容,可以让没有内容的不占据位置吗;2. 常量在外面不加引号会报错。3. wordpress里,这样的目录列表是属于小工具还是啥?4. python - Fiddler+Android模拟器抓取app,json数据被加密了,如何解析?5. python如何设置一个随着系统时间变化的动态变量?6. android - Genymotion 微信闪退 not find plugin.location_google.GoogleProxyUI7. 我的怎么不显示啊,话说有没有QQ群什么的8. mysql federated引擎无法开启9. MySQL 使用 group by 之后然后 IFNULL(COUNT(*),0) 为什么还是会获得 null10. sublime text3安装package control失败
