AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 517717
Accepted
Vorac
Vorac
Asked: 2019-05-08 23:33:14 +0800 CST2019-05-08 23:33:14 +0800 CST 2019-05-08 23:33:14 +0800 CST

Instalando o matplotlib

  • 772
$ pip3 install matplotlib
Requirement already satisfied: matplotlib in /home/vorac/.local/lib/python3.7/site-packages (3.0.3)
Requirement already satisfied: cycler>=0.10 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (2.3.0)
Requirement already satisfied: numpy>=1.10.0 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (1.16.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cycler>=0.10->matplotlib) (1.12.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)

Tudo certo. Agora:

$ python3
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> 
>>> 
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2372, in <module>
    switch_backend(rcParams["backend"])
  File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
    backend_mod = importlib.import_module(backend_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
    from . import _backend_tk
  File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
    import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'

Esquisito.

$ pip3 install tkinter
Collecting tkinter
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/tkinter/

A referida página realmente contém apenas o texto "404 Not Found". O que devo fazer nesta situação. Estou tentando instalar pacotes no meu $HOME local, mas uma instalação em todo o sistema também pode funcionar.

debian python3
  • 1 1 respostas
  • 462 Views

1 respostas

  • Voted
  1. Best Answer
    Stephen Kitt
    2019-05-09T00:21:05+08:002019-05-09T00:21:05+08:00

    Já que você está usando o Debian, e os módulos que você está interessado estão disponíveis como pacotes, podemos usá-los para resolver seu problema. Em circunstâncias como essas, onde usar parte de um módulo requer outro módulo que não faz parte das dependências estritas do primeiro, provavelmente há uma dependência opcional que resolveria seu problema; o pacote para matplotlibé python3-matplotlib, então

    apt show python3-matplotlib
    

    irá nos dizer quais dependências opcionais são recomendadas ou sugeridas para este módulo. Neste caso, python3-tkestá listado e parece um candidato provável, o que é confirmado por

    apt show python3-tk
    

    Então

    sudo apt install python3-tk
    

    deve resolver seu problema.

    • 1

relate perguntas

  • Configuração do GRUB para reconhecer diferentes ambientes de desktop (instalações) da mesma distribuição Linux

  • astyle não altera a formatação do arquivo de origem

  • Recebendo e-mail em um novo Debian fresco

  • Debian Stretch: gnome-software segfault em libgs_plugin_systemd-updates.so

  • Como digitar ü no Pinyin IME?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve