0

I see the following error when I attempt to import koalas from databricks. I am using pyspark v2.4.5 and I'm able to successfully connect to my Spark cluster. It seems that using python 3.5 and connecting to Databricks Runtime 5.x works. I created a clean virtual environment and installed koalas via conda install -c conda-forge koalas. I have also attempted to rollback kolas to an earlier version to no avail. Please let me know if I can help provide additional details.

  File "C:/...", line 1, in <module>
    import databricks.koalas as ks
  File "C:\ProgramData\Anaconda3\envs\...\lib\site-packages\databricks\koalas\__init__.py", line 55, in <module>
    from databricks.koalas.frame import DataFrame
  File "C:\ProgramData\Anaconda3\envs\...\lib\site-packages\databricks\koalas\frame.py", line 78, in <module>
    from databricks.koalas.plot import KoalasFramePlotMethods
  File "C:\ProgramData\Anaconda3\envs\...\lib\site-packages\databricks\koalas\plot.py", line 22, in <module>
    from matplotlib.axes._base import _process_plot_format
ModuleNotFoundError: No module named 'matplotlib.axes'
  • Hi George, can you import any module from `matplotlib`? It may be that `koalas` is not installing `matplotlib` correctly. The workaround could be to install `matplotlib` and then install `koalas`. – Brydenr Mar 13 '20 at 15:30
  • Thank you very much for the timely response. I have tried to install matplotlib first. When, in fact, I try to import a module from matplotlib I see the error below, so it appears that koalas may actually not be the source of the issue: ```ModuleNotFoundError: No module named 'matplotlib.artist'``` – George Zep Mar 13 '20 at 16:26
  • It seems that I had a corrupted version of matplotlib cached in Roaming under ```AppData\Roaming\Python\Python37\site-packages```. The package name began with a hyphen as ```-atplotlib```. Deleting the package and clearing the conda and pip caches seemed to do the trick. – George Zep Mar 13 '20 at 18:35
  • Hi @GeorgeZep, I too have a similar problem. Not just on my local machine but as well as on AWS EMR cluster. Any idea how does one get rid of the corrupted version of matplotlib on linux/unix/ubunut – Sowmya Jun 09 '20 at 16:09

0 Answers0