You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/troubleshooting.md
+18-16
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ jupyter:
37
37
<!-- #region -->
38
38
### Version Problems
39
39
40
-
In order to follow the examples in this documentation, you should have the latest version of `plotly` installed (4.x), as detailed in the [Getting Started](/python/getting-started) guide. This documentation (under https://plotly.com/python) is incompatible with `plotly` version 3.x, for which the documentation is available under https://plotly.com/python/v3.
40
+
In order to follow the examples in this documentation site, you should have the latest version of `plotly` installed (4.x), as detailed in the [Getting Started](/python/getting-started) guide. This documentation (under https://plotly.com/python) is incompatible with `plotly` version 3.x, for which the documentation is available under https://plotly.com/python/v3. In general you must also have the correct version of the underlying Plotly.js rendering engine installed, and the way to do that depends on the environment in which you are rendering figures: Dash, Jupyter Lab or Classic Notebook, VSCode etc. Read on for details about troubleshooting `plotly` in these environments.
The classic Jupyter Notebook (i.e. launched with `jupyter notebook`) sometimes suffers from a problem whereby if you close the window and reopen it, your plots render as blank spaces.
68
-
69
-
The easiest solution is to force the `notebook` renderer to reload by calling `fig.show("notebook")` instead of just `fig.show()`.
70
-
71
-
If this problem is recurrent, you may safely run the following code in a Notebook (not in JupyterLab!) at any time and it should restore your figures (for example, you may put it at the top of your notebook for easy access):
72
-
73
-
```python
74
-
import plotly.io as pio
75
-
pio.renderers.default='notebook'
76
-
```
77
-
78
-
As a last resort, you can "Restart & Clear Output" from the Kernel menu and rerun your notebook.
79
65
80
66
### JupyterLab Problems
81
67
82
-
In order to use `plotly` in JupyterLab, you *must have the extensions installed* as detailed in the [Getting Started guide](/python/getting-started). There are two extensions: `jupyterlab-plotly` for rendering figures with `fig.show()` and `plotlywidget` for the `FigureWidget`. Please note that the *extension version matters*: the extension versions in the [Getting Started](/python/getting-started) guide match the version of `plotly` at the top of the guide and so they should be installed together. Note also that these extensions are meant to work with JupyterLab 1.x and 2.x but not 0.x.
68
+
In order to use `plotly` in JupyterLab, you *must have the extensions installed* as detailed in the [Getting Started guide](/python/getting-started). There are two extensions: `jupyterlab-plotly` for rendering figures with `fig.show()` and `plotlywidget` for the `FigureWidget`. Please note that the *extension version matters*: the extension versions in the [Getting Started](/python/getting-started) guide match the version of `plotly` at the top of the guide and so they should be installed together.
83
69
84
70
To list your current extensions, run the following command in a terminal shell **from the same environment as JupyterLab was launched**:
85
71
@@ -121,6 +107,22 @@ unset NODE_OPTIONS
121
107
# (Windows)
122
108
set NODE_OPTIONS=
123
109
```
110
+
111
+
### Jupyter Classic Notebook Problems
112
+
113
+
The classic Jupyter Notebook (i.e. launched with `jupyter notebook`) sometimes suffers from a problem whereby if you close the window and reopen it, your plots render as blank spaces.
114
+
115
+
The easiest solution is to force the `notebook` renderer to reload by calling `fig.show("notebook")` instead of just `fig.show()`.
116
+
117
+
If this problem is recurrent, you may safely run the following code in a Notebook (not in JupyterLab!) at any time and it should restore your figures (for example, you may put it at the top of your notebook for easy access):
118
+
119
+
```python
120
+
import plotly.io as pio
121
+
pio.renderers.default='notebook'
122
+
```
123
+
124
+
As a last resort, you can "Restart & Clear Output" from the Kernel menu and rerun your notebook.
125
+
124
126
<!-- #endregion -->
125
127
126
128
### VSCode Notebook, Nteract and Streamlit Problems
0 commit comments