python - matplotlib安裝之后使用出錯
問題描述
產生錯誤:
ImportError: No module named ’_tkinter’, please install the python3-tk package
在網(wǎng)上找到的解決方法是安裝 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. 微信公眾號在線生成二維碼帶參數(shù)怎么搞?2. 微信開放平臺 - android 微信支付后點完成按鈕,后回調打開第三方頁面,屏幕閃動,求解決方法3. PHP單例模式4. javascript - angularjs使用ui-router何時拉數(shù)據(jù)?5. vue計算屬性怎么樣與for結合使用6. javascript - webpack dllPlugin如何打包vendor到html里面?7. javascript - 微信報redirect_uri參數(shù)錯誤8. 我在centos容器里安裝docker,也就是在容器里安裝容器,報錯了?9. android - 類似微信朋友圈或者QQ空間說說那種點擊圖片放大,并且有放大縮小手勢,左右滑動圖片手勢效果10. win10系統(tǒng) php安裝swoole擴展
