By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
when I execute px.scatter(gapminder2007, x="gdpPercap", y="lifeExp") I got an error in browser and nothing is showed in jupyterlab, but place for graph is reserved:
ReferenceError: require is not defined[Learn More] lab line 270693 > scriptElement:1:1
(index):1
attachWidget panellayout.js:210
insertWidget panellayout.js:113
_insertOutput widget.js:335
onModelChanged widget.js:217
invokeSlot index.js:475
emit index.js:433
emit index.js:106
_onListChanged model.js:282
invokeSlot index.js:475
emit index.js:433
emit index.js:106
push observablelist.js:137
_add model.js:213
add model.js:139
_onIOPub widget.js:93
_handleIOPub future.js:212
InterpretGeneratorResume (index):1255
next (index):1210
fulfilled future.js:6
In the same notebook plotly works, for example:
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
plot([go.Scatter(x=[1, 2, 3], y=[3, 1, 6])])
OS: Linux Manjaro
Browser: Firefox 66.0.1 (64-bit)
plotly: 3.7.1
plotly_express: plotly_express.
version
doesn't work, I don't know how to check
jupyterlab: 0.35.4
jupyterlab/plotly-extension: I don't know how to check version, but I have just installed it today
Looks like I forgot to execute:
`# Avoid "JavaScript heap out of memory" errors during extension installation
(OS X/Linux)
export NODE_OPTIONS=--max-old-space-size=4096
(Windows)
set NODE_OPTIONS=--max-old-space-size=4096
Jupyter widgets extension
jupyter labextension install @jupyter-widgets/[email protected] --no-build
FigureWidget support
jupyter labextension install [email protected] --no-build
offline iplot support
jupyter labextension install @jupyterlab/[email protected] --no-build
JupyterLab chart editor support (optional)
jupyter labextension install [email protected] --no-build
Build extensions (must be done to activate extensions since --no-build is used above)
jupyter lab build
Unset NODE_OPTIONS environment variable
(OS X/Linux)
unset NODE_OPTIONS
(Windows)
set NODE_OPTIONS=`
...as it is stated on page
https://github.com/plotly/plotly.py/blob/master/README.md
in section "JupyterLab Support (Python 3.5+)"
Now everything works. I hope this information will help to someone.
eddy-geek, sperretcraft, madpower2000, krlng, and klauskades reacted with thumbs up emoji
madpower2000 reacted with rocket emoji
All reactions
liang3404814, checor, thepeanutbasket, quancore, silversillu, simonare, vikramchatterji, hayashiya18, BuekersJoren, JakeTheSnake3p0, and 19 more reacted with thumbs up emoji
simonare, Persedes, bartek3012, reservoirinvest, mecevit, marissamunleyazl, hp027, and SenchoPens reacted with rocket emoji
All reactions