python - matplotlib安裝之后使用出錯(cuò)
問(wèn)題描述
產(chǎn)生錯(cuò)誤:
ImportError: No module named ’_tkinter’, please install the python3-tk package
在網(wǎng)上找到的解決方法是安裝 python3-tk包:
但是在我使用的 ubuntu17.04 中找不到這個(gè)包,求解決辦法?
問(wèn)題解答
回答1:你把更新源換一下,然后重新試一下,換成國(guó)內(nèi)阿里或者其它的。
命令行:先備份sudo /etc/apt/sources.list /etc/apt/sources.list.bak然后編輯 sudo gedit /etc/apt/sources.list把以下內(nèi)容放進(jìn)去替換掉原來(lái)的源
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##測(cè)試版源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##測(cè)試版源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
相關(guān)文章:
1. 老師您的微信號(hào)是多少?2. node.js - nodejs開(kāi)發(fā)中常用的連接mysql的庫(kù)3. mysql replace 死鎖4. mysql - 把一個(gè)表中的數(shù)據(jù)count更新到另一個(gè)表里?5. node.js - 為什么微信的消息MsgId出現(xiàn)重復(fù)了,無(wú)法排重了。。6. 視頻文件不能播放,怎么辦?7. mysql - 分庫(kù)分表、分區(qū)、讀寫(xiě)分離 這些都是用在什么場(chǎng)景下 ,會(huì)帶來(lái)哪些效率或者其他方面的好處8. 請(qǐng)教使用PDO連接MSSQL數(shù)據(jù)庫(kù)插入是亂碼問(wèn)題?9. 雙擊安裝程序,安裝不了10. mysql - 字符串根據(jù)字典替換
