I recently installed \"Anaconda3 for Windows v2.4.0\" on my Windows 10 Home (64 bit) machine.
(I downloaded the Windows 64-bit Graphical Installer \"Anaconda3-2.4.0-
This is a bug in python, not matplotlib.
The issue is that winreg.EnumValue is not cutting string values at their length properly for some reason, and strings will include null characters which os.path.abspath is not able to process.
The registry entry where this happens is at SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts. Despite this not being matplotlib's fault we can still temporarily patch it so that it ends the string at '\0'. In font_manager.py, patch line 310 in the win32InstalledFonts() function to:
key, direc, any = winreg.EnumValue( local, j)
if not is_string_like(direc):
continue
if not os.path.dirname(direc):
direc = os.path.join(directory, direc)
direc = direc.split('\0', 1)[0]