Issue 1:
Bug report

Bug summary

I can find font_manager.py in my folder, but it cannot recognise that

Code for reproduction

import matplotlib

Actual outcome

# If applicable, paste the console output here
#
#
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in <module>()
1352 try:
-> 1353 fontManager = json_load(_fmcache)
1354 if (not hasattr(fontManager, '_version') or

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in json_load(filename)
887 """
--> 888 with open(filename, 'r') as fh:
889 return json.load(fh, object_hook=_json_decode)

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\victor\\.matplotlib\\fontlist-v300.json'

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last)
<ipython-input-1-5c78ffaa5488> in <module>()
----> 1 get_ipython().run_line_magic('matplotlib', 'inline')
2 import pandas as pd

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2129 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2130 with self.builtin_trap:
-> 2131 result = fn(*args,**kwargs)
2132 return result
2133

<decorator-gen-108> in matplotlib(self, line)

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\IPython\core\magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\IPython\core\magics\pylab.py in matplotlib(self, line)
97 print("Available matplotlib backends: %s" % backends_list)
98 else:
---> 99 gui, backend = self.shell.enable_matplotlib(args.gui)
100 self._show_matplotlib_backend(args.gui, backend)
101

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\IPython\core\interactiveshell.py in enable_matplotlib(self, gui)
3047 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
3048
-> 3049 pt.activate_matplotlib(backend)
3050 pt.configure_inline_support(self, backend)
3051

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\IPython\core\pylabtools.py in activate_matplotlib(backend)
308 matplotlib.rcParams['backend'] = backend
309
--> 310 import matplotlib.pyplot
311 matplotlib.pyplot.switch_backend(backend)
312

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\pyplot.py in <module>()
30 from cycler import cycler
31 import matplotlib
---> 32 import matplotlib.colorbar
33 import matplotlib.image
34 from matplotlib import rcsetup, style

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\colorbar.py in <module>()
30 import matplotlib.collections as collections
31 import matplotlib.colors as colors
---> 32 import matplotlib.contour as contour
33 import matplotlib.cm as cm
34 import matplotlib.gridspec as gridspec

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\contour.py in <module>()
16 import matplotlib.colors as mcolors
17 import matplotlib.collections as mcoll
---> 18 import matplotlib.font_manager as font_manager
19 import matplotlib.text as text
20 import matplotlib.cbook as cbook

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in <module>()
1361 raise
1362 except Exception:
-> 1363 _rebuild()
1364 else:
1365 _rebuild()

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in _rebuild()
1342 global fontManager
1343
-> 1344 fontManager = FontManager()
1345
1346 if _fmcache:

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in __init__(self, size, weight)
976 self.defaultFont = {}
977
--> 978 ttffiles = findSystemFonts(paths) + findSystemFonts()
979 self.defaultFont['ttf'] = next(
980 (fname for fname in ttffiles

c:\users\victor\appdata\local\programs\python\python35\lib\site-packages\matplotlib\font_manager.py in findSystemFonts(fontpaths, fontext)
262 fontpaths = [win32FontDirectory()]
263 # now get all installed fonts directly...
--> 264 fontfiles.update(win32InstalledFonts(fontext=fontext))
265 else:
266 fontpaths = X11FontDirectories

TypeError: 'NoneType' object is not iterable

Expected outcome

Matplotlib version

Operating system: Win10

Matplotlib version: 3.0.0

Matplotlib backend (print(matplotlib.get_backend())):

Python version: 3.5

Jupyter version (if applicable):

Other libraries:

Issue 2:
Bug report

Bug summary

I am unable to import matplotlib.pyplot starting in version 3.0.0. Might be related to Issue #9485?

Code for reproduction

import matplotlib.pyplot as plt

Actual outcome

I get the following traceback when executing the above import

Traceback (most recent call last):
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 1353, in <module>
fontManager = json_load(_fmcache)
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 888, in json_load
with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\username\\.matplotlib\\fontlist-v300.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Python\Python35\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "C:\Python\Python35\lib\site-packages\matplotlib\colorbar.py", line 32, in <module>
import matplotlib.contour as contour
File "C:\Python\Python35\lib\site-packages\matplotlib\contour.py", line 18, in <module>
import matplotlib.font_manager as font_manager
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 1363, in <module>
_rebuild()
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 1344, in _rebuild
fontManager = FontManager()
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 978, in __init__
ttffiles = findSystemFonts(paths) + findSystemFonts()
File "C:\Python\Python35\lib\site-packages\matplotlib\font_manager.py", line 264, in findSystemFonts
fontfiles.update(win32InstalledFonts(fontext=fontext))
TypeError: 'NoneType' object is not iterable

Matplotlib version

Operating system: Windows 10 64-bit

Matplotlib version: 3.0.0

Matplotlib backend: TkAgg

Python version: 3.5.4

Jupyter version (if applicable): NA

Other libraries: NA

Installed via pip