Unable to import plotly.figure_factory

I can not import plotly.figure_factory

The code I'm using is based on this example.

The module is imported according to the following fragment:

import plotly.plotly as py
import plotly.figure_factory as FF

I could not find any documentation on figure_factorythe plotlysite.

Any ideas?

+6
source share
2 answers

Dense documentation is sometimes a bit inconsistent and missed some updates to the library itself.

If you replace the second line with

from plotly.tools import FigureFactory as FF

your code should work as expected.

+8
source

This is a version issue. I used Jupiter notebook on Google Colab, and:

import plotly.figure_factory as FF

will not work because plot 1.1.12

But if you try

from plotly.tools import FigureFactory as FF

it works.

, :

import plotly
print (plotly.\_\_version\_\_)
0

Source: https://habr.com/ru/post/1670773/


All Articles