Docker-stacks: Seaborn inclusion results in font-family not found when plotting

Created on 24 Apr 2017  路  3Comments  路  Source: jupyter/docker-stacks

What docker image you are using?

jupyter/all-spark-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

docker run -it --rm -p 8889:8888 jupyter/all-spark-notebook:latest

What steps do you take once the container is running to reproduce the issue?

  1. Visit http://localhost:8889
  2. Start an Python 3 Notebook
  3. Execute in cell:
%matplotlib inline
import pandas as pd
import seaborn as sns

pd.Series([1,2,3]).plot(kind='bar')

What do you expect to happen?

A plot, with no emitted warnings.

What actually happens?

The following gets emitted as a warning:

/opt/conda/lib/python3.5/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans
  (prop.get_family(), self.defaultFamily[fontext]))

I believe the problem is caused by seaborn's stylesheets for matplotlib. Plotting without seaborn does not result in this warning. Looking in the matplotlib fonts data directory, I see now sans-serif fonts. However, I don't know the rationale for the specific Debian jesse FROM, and I don't know much (anything) about debian font management. This is a minor issue. However, I suspect a debian sys-admin or someone familiar with seaborn could fix more "correctly" than I could.

Bug

Most helpful comment

All 3 comments

The last comment was a note I made for myself on a mobile about how to potentially fix the issue. I realize now coming back through that it might be taken as "here's your fix". Sorry about that!

No worries, @parente. I do the same with issue comments. Appreciate you looking into this.

I tried both of those things solutions prior to my creating this issue. But, it was like, hour 14 of a day of fixing my pipeline's plumbing, so I could have made a mistake in frustration and haste.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

niyazpk picture niyazpk  路  4Comments

statiksof picture statiksof  路  4Comments

fyears picture fyears  路  5Comments

aar0nTw picture aar0nTw  路  4Comments

edurenye picture edurenye  路  4Comments