Fix Python Matplotlib ImportError: cannot import name ‘_path’ Error: A Beginner Guide – Matplotlib Tutorial

By | November 29, 2019

We have used python matplotlib library to write a python example, however, we encounter an ImportError: cannot import name ‘_path’. In this tutorial, we will introduce how to fix this error.

Why this import error occur?

Look at error message below:

python matplotlib importError - connot import name '_path'

We will find: we have installed python matplotlib, however, this error is reported in path.py.

As to us, this version of python matplotlib is installed in python 3.5, however, the current python version is python 3.6, we have updated python version. So this error occurs.

How to fix matplotlib import error?

The most easiest way is install python matplotlib in python 3.6 again. You can read this tutorial to install matplotlib with anaconda.

Anaconda Install Matplotlib: Fix UnsatisefiableError (A Completed Guide) – Matplotlib Tutorial

We install it again, then this import error is fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *