Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.3K
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda