Skip to content Skip to sidebar Skip to footer

Attributeerror: Module 'matplotlib' Has No Attribute 'get_data_path' On Visual Studio's Jupyter-notebook

I get the following error when I want to import matplotlib.pyplot on the Visual Studio's jupyter-notebook. -------------------------------------------------------------------------

Solution 1:

I had this same problem and solve it by using the following sequence \

  • use terminal to direct to project root folder
  • Suppose you are running conda environment. so, activate the environment by conda activate env-name
  • run python interpreter : python command and check weather matplotib has installed by\ import matplotlib
  • run code . command to open VScode in this directory.
  • open terminal and check weather enviromnet has activated enter image description here
  • also check weather jupyter Ipython kernel runs on the same environment enter image description here
  • if any environment is not the one then, change it to a particular one\

this won't happen in the pip environment usually, because VScode does not activate two channels [pip, conda] or conda environment automatically most of the times.

Solution 2:

I had the same problem because I was using the wrong python kernel. I had that problem when using the standard python kernel, but not when using a virtual env (which is what I usually use).

Post a Comment for "Attributeerror: Module 'matplotlib' Has No Attribute 'get_data_path' On Visual Studio's Jupyter-notebook"