many SCCAF methods can only be used from inside iPython/Jupyter notebooks
Closed this issue · 2 comments
pcm32 commented
This clearly reduces the usability of the tool. Executing something like from SCCAF import *
on a pure python environment produces:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/pmoreno/venvs/sccaf.sccaf/lib/python3.6/site-packages/SCCAF/__init__.py", line 1549, in <module>
plotly.offline.init_notebook_mode(connected=True)
File "/Users/pmoreno/venvs/sccaf.sccaf/lib/python3.6/site-packages/plotly/offline/offline.py", line 272, in init_notebook_mode
raise ImportError('`iplot` can only run inside an IPython Notebook.')
ImportError: `iplot` can only run inside an IPython Notebook.
there should be some conditionality that detects whether this is being run inside iPython notebooks or not to make use of iplot or else an alternative plotting device.
chichaumiau commented
we do not need to plot in command line!
pcm32 commented
Yes, I have fixed this now by moving around some imports into methods that require them.