Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.3K
Visualizações
ImportError: cannot import name '_path' matplotlib

When importing matplotlib by import matplotlib.pyplot as plt I'm getting the following error:

Traceback (most recent call last):   File "mode.py", line 1, in <module>
    import matplotlib.pyplot as plt   File "C:\Users\yuhan\AppData\Roaming\Python\Python36\site-packages\matplotlib\pyplot.py", line 32, in <module>
    import matplotlib.colorbar   File "C:\Users\yuhan\AppData\Roaming\Python\Python36\site-packages\matplotlib\colorbar.py", line 32, in <module>
    import matplotlib.artist as martist   File "C:\Users\yuhan\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py", line 16, in <module>
    from .path import Path   File "C:\Users\yuhan\AppData\Roaming\Python\Python36\site-packages\matplotlib\path.py", line 25, in <module>
    from . import _path, rcParams ImportError: cannot import name '_path'

I tried reinstalling the whole matplotlib library, tried re-installing Python 3.6 etc. I really do not know what is wrong and since I don't have a backup.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

py -m pip uninstall matplotlib

then:

py -m pip install matplotlib

worked for me for that error as well.

Then I had a problem of kiwisolver not being found, and did the same uninstall, install for kiwisolver and now: import matplotlib.pyplot as plt works.

over 4 years ago · Santiago Trujillo Relatório

0

This problem can pop up when you copy libraries from place to place (at least that's what happend with me :P)

Make sure that in .../Python37/Lib/site-packages there is a file named: matplotlib-3.0.2-py3.7-nspkg.pth with the correct version of Python and matplotlib

(in this example I am using python 3.7.1 and matplotlib 3.0.2)

If that's not the case, reinstall matplotlib like other users suggested. Make sure also that you are targeting the correct directory (sometimes I've seen that the problem might be the wrong version of pip)

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda