1

When trying to run 2 libraries on jupyter. I am running the following code:

    import pandas as pd
    from pandas_profiling import ProfileReport

This is returning the following error:

AttributeError                            Traceback (most recent call last)
<ipython-input-31-98f09099f855> in <module>
      1 import pandas as pd
----> 2 from pandas_profiling import ProfileReport

~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in <module>
      5 
      6 from pandas_profiling.config import Config, config
----> 7 from pandas_profiling.controller import pandas_decorator
      8 from pandas_profiling.profile_report import ProfileReport
      9 from pandas_profiling.version import __version__

~\Anaconda3\lib\site-packages\pandas_profiling\controller\pandas_decorator.py in <module>
      2 from pandas import DataFrame
      3 
----> 4 from pandas_profiling.__init__ import ProfileReport
      5 
      6 

~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in <module>
      6 from pandas_profiling.config import Config, config
      7 from pandas_profiling.controller import pandas_decorator
----> 8 from pandas_profiling.profile_report import ProfileReport
      9 from pandas_profiling.version import __version__
     10 
            .
            .
            .

~\Anaconda3\lib\site-packages\matplotlib\textpath.py in <module>
      9 from matplotlib.font_manager import FontProperties, get_font
     10 from matplotlib.ft2font import LOAD_NO_HINTING, LOAD_TARGET_LIGHT
---> 11 from matplotlib.mathtext import MathTextParser
     12 from matplotlib.path import Path
     13 from matplotlib.transforms import Affine2D

~\Anaconda3\lib\site-packages\matplotlib\mathtext.py in <module>
   1057 
   1058 
-> 1059 class StandardPsFonts(Fonts):
   1060     """
   1061     Use the standard postscript fonts for rendering to backend_ps

~\Anaconda3\lib\site-packages\matplotlib\mathtext.py in StandardPsFonts()
   1064     one requires the Ps backend.
   1065     """
-> 1066     basepath = str(cbook._get_data_path('fonts/afm'))
   1067 
   1068     fontmap = {

AttributeError: module 'matplotlib.cbook' has no attribute '_get_data_path'

My matplotlib has always worked fine without the jupyter. I have tried reinstall of matplotlib. but still getting the same error.

  • Maybe [this SO post](https://stackoverflow.com/questions/53421905/matplotlib-attributeerror-module-matplotlib-cbook-has-no-attribute-define-a) helps. – above_c_level Jun 06 '20 at 17:23
  • Hey, I had this same error. Closing the terminal and restarting it helped resolve it for me. – Loner Jul 15 '20 at 17:51

0 Answers0