Hi I am trying to use plotly while completely offline. This practically means that if any kind of requests need to be made to an internet service, they wont be able to go through:
I am using a very simple import to start my work:
from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
print __version__ # requires version >= 1.9.0
Every time, and no matter what I try, I keep getting the same error message:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-12-dd44b8cf2e22> in <module>
----> 1 from plotly import __version__
2 from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
3
4 print(__version__) # requires version >= 1.9.0
~/anaconda3/lib/python3.7/site-packages/plotly/__init__.py in <module>
29 from __future__ import absolute_import
30
---> 31 from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
32 utils, session, offline, colors, io)
33 from plotly.version import __version__
~/anaconda3/lib/python3.7/site-packages/plotly/plotly/__init__.py in <module>
8
9 """
---> 10 from . plotly import (
11 sign_in,
12 update_plot_options,
~/anaconda3/lib/python3.7/site-packages/plotly/plotly/plotly.py in <module>
29
30 from plotly import exceptions, files, session, tools, utils
---> 31 from plotly.api import v1, v2
32 from plotly.basedatatypes import BaseTraceType, BaseFigure, BaseLayoutType
33 from plotly.plotly import chunked_requests
~/anaconda3/lib/python3.7/site-packages/plotly/api/v1/__init__.py in <module>
1 from __future__ import absolute_import
2
----> 3 from plotly.api.v1.clientresp import clientresp
~/anaconda3/lib/python3.7/site-packages/plotly/api/v1/clientresp.py in <module>
7
8 from plotly import config, utils, version
----> 9 from plotly.api.v1.utils import request
10
11
~/anaconda3/lib/python3.7/site-packages/plotly/api/v1/utils.py in <module>
3 import requests
4 from requests.exceptions import RequestException
----> 5 from retrying import retry
6
7 from plotly import config, exceptions
ModuleNotFoundError: No module named 'retrying'
I am not sure if there's any reason why I should bother with installing "retrying" or whether there is simply no way to get 'plotly' to work completely offline. At the very least, offline is misleading--they could go with serveless or something instead.
init_notebook_mode(connected=True)may be cause your problem