I know there is an answer to a similar question like this, but it won't help in my particular case. I wrote some python code for a client, and he can't get it to run in windows CMD. He has an error with matplotlib. The error is with the line "import matplotlib.pyplot as plt" and it says that matplotlib has no attribute 'get_data_path'. He isn't using conda or anything, just writing 'py program.py' to run the code. I've included a picture he sent me. Does anyone know what to do about this.
3 Answers
I encountered the same error when I am installing Matplotlib in my new environment in Anaconda, at the same line: "import matplotlib.pyplot as plt".
What I did to fix is to restart the jupyter kernel and re-run the code twice (1st time failed, second time passed), after I complete the matplotlib installation in anaconda prompt (with command: conda install -c conda-forge matplotlib, then fixed the issue "DLL load failed while importing _imaging" with conda update Pillow).

pip uninstall matplotlib?pip install matplotlib --upgrade?