search

Home  >  Q&A  >  body text

python - matplotlib error after installation

Error generated:

ImportError: No module named '_tkinter', please install the python3-tk package

The solution found on the Internet is to install the python3-tk package:

But I can’t find this package in the ubuntu17.04 I’m using. Any solutions?

滿天的星座滿天的星座2710 days ago1071

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-06-28 09:28:09

    Change the update source and try again, switch to domestic Alibaba or other sources.

    Command line: First backup sudo /etc/apt/sources.list /etc/apt/sources.list.bak
    Then edit sudo gedit /etc/apt/sources.list
    Put the following content in to replace the original source

    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 save
    Command line: sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install python3-tk

    reply
    0
  • Cancelreply