python - matplotlib安裝之後使用出錯
滿天的星座
滿天的星座 2017-06-28 09:26:09
0
1
864

產生錯誤:

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 multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb 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 multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-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 partner
deb http://extras.ubuntu.com/ubuntu/ xenial main

save保存
命令列:sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-tk

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!