Can't import plotly.figure_factory
Plotly's documentation is sometimes a bit inconsistent and missed some updates to the library itself.
If you substitute your second line with
from plotly.tools import FigureFactory as FF
your code should work as expected.