azizi
July 8, 2019, 4:35pm
1
Iâm trying to use cufflinks together with plotly in django but unfortunately, keep getting the error cannot import name âFigureWidgetâ.
Searching on the related post doesnât solve the problem so far.
Hi @vhphan ,
Did you follow all of the installation instructions in the README at https://github.com/plotly/plotly.py ? There are several packages with particular versions that you need to get FigureWidget working.
-Jon
opened 05:28AM - 25 Oct 18 UTC
While getting trained by the section of "plotly an cufflinks" I found this packa⌠ges installation are not user friendly.
1- Jupyter is not import them easily like previous packages so I had to copy ployly and cufflinks exactly in the same folder of Jupyter which was runnig... I manage to troubleshoot the importing issue of plotly ... but for importing cufflinks I faces below error:
import cufflinks as cf
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-3178e833bc72> in <module>()
----> 1 import cufflinks as cf
~\Desktop\Complete-Python-3-Bootcamp-master\Refactored_Py_DS_ML_Bootcamp-master\cufflinks\__init__.py in <module>()
19
20 from .helper import _printer as help
---> 21 from .plotlytools import *
22 from plotly.graph_objs import *
23 from plotly.plotly import plot
~\Desktop\Complete-Python-3-Bootcamp-master\Refactored_Py_DS_ML_Bootcamp-master\cufflinks\plotlytools.py in <module>()
4 import copy
5 # from plotly.graph_objs import *
----> 6 from plotly.graph_objs import Figure, Bar, Box, Scatter, FigureWidget, Scatter3d, Histogram, Heatmap, Surface, Pie
7 import plotly.figure_factory as ff
8 from collections import defaultdict
ImportError: cannot import name 'FigureWidget'
installing "ipywidgets " didnt resolve the issue, as per github recommendations.
thanks in advance
Did follow the installation version from README , installing as below:
pip install plotly==3.1.0
pip install ânotebook>=5.3â âipywidgets>=7.2â
It doesnât work either.
Hope anyone can update /recommend anything.
However i can import cufflinks in jupyter notebook though and plot the graph.
Appreciate any help