ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 24 Feb 2021 22:24:17 +0100implicit_plot3d not rendering in Jupyter Labhttps://ask.sagemath.org/question/55896/implicit_plot3d-not-rendering-in-jupyter-lab/I'm unable to see any 3D plots in Jupyter Lab. I have tried forcing `viewer="threejs"` in the argument of a similar object, and have the same issue. Here's a screenshot of what it looks like: https://imgur.com/a/K8R3pZr. Any suggestions?
**Edit**: I'm running Ubuntu 20.10.
**Update**: I'm able to plot in Jupyter Notebook, so it's probably an issue with Jupyter Lab.
**Update**: forcing `viewer = "java3d"`,`viewer = "canvas3d"`, `viewer = "jsmol"` doesn't work either.
**Update**: I ran `sage -n jupyterlab` in the terminal. Everything seems to work fine until this:
`[W 2021-02-24 23:09:07.428 LabApp] Could not determine jupyterlab build status without nodejs`
`[W 2021-02-24 23:09:10.621 ServerApp] 404 GET /nbextensions/threejs/build/three.min.js (127.0.0.1) 19.83ms referer=http://localhost:8889/lab/tree/Jupyter/mcs_320/2-24.ipynb`
`[W 2021-02-24 23:09:10.624 ServerApp] 404 GET /nbextensions/threejs/examples/js/controls/OrbitControls.js (127.0.0.1) 2.01ms referer=http://localhost:8889/lab/tree/Jupyter/mcs_320/2-24.ipynb`
`[W 2021-02-24 23:09:10.686 ServerApp] 404 GET /nbextensions/threejs/examples/js/controls/OrbitControls.js (127.0.0.1) 2.08ms referer=http://localhost:8889/lab/tree/Jupyter/mcs_320/2-24.ipynb`
`[I 2021-02-24 23:09:10.815 ServerApp] Kernel started: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
`[W 2021-02-24 23:09:24.167 ServerApp] 404 GET /nbextensions/threejs/build/three.min.js (127.0.0.1) 1.86ms referer=http://localhost:8889/lab/tree/Jupyter/mcs_320/2-24.ipynb`
`[W 2021-02-24 23:09:24.170 ServerApp] 404 GET /nbextensions/threejs/examples/js/controls/OrbitControls.js (127.0.0.1) 1.88ms referer=http://localhost:8889/lab/tree/Jupyter/mcs_320/2-24.ipynb`
`[I 2021-02-24 23:10:30.056 ServerApp] Kernel shutdown: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
**Update**: Forcing `viewer = "tachyon"` works, but is not interactive.
**Update**: There must have been something wrong with how I installed Sage. I reinstalled using Anaconda and it works fine now.dfarmi2Wed, 24 Feb 2021 22:24:17 +0100https://ask.sagemath.org/question/55896/Interact in Jupyterlab vs Jupyterhttps://ask.sagemath.org/question/50194/interact-in-jupyterlab-vs-jupyter/Hello, Sage community!
I find Jupyterlab to be more comfortable than Jupyter, so I installed it with
sage -pip install jupyterlab
and I execute it with
sage -n jupyterlab
Everything work well, except when I try to execute an interact, in which case, no sliders, no selection boxes, etc. appear. However, if I use Jupyter with
sage -n jupyter
the interact works well.
Here is a minimal working example:
@interact
def const(k = slider(-5,5,0.1,1,label='Constant')):
print(k)
In this particular case, I obtain in Jupyterlab just `1.00000000000000` without any controls, nor the possibility to change the value of `k`.
Can somebody explain why it is not possible to use interacts in Jupyterlab while it is possible in Jupyter?dsejasMon, 09 Mar 2020 06:09:38 +0100https://ask.sagemath.org/question/50194/SageMath and interact / ipywidgets with jupyterhttps://ask.sagemath.org/question/41269/sagemath-and-interact-ipywidgets-with-jupyter/I got the SageMath kernel working well inside my anaconda distribution's copy of jupyter, following [these instructions](https://stackoverflow.com/a/41595015), so I can open SageMath notebooks using anaconda jupyter and they run perfectly fine -- almost.
I would like to get interact elements / ipywidgets working when I use SageMath as a kernel in anaconda jupyter, but with my current configuration (hopefully described in sufficient detail below), I get the following error message in the console
>[IPKernelApp] WARNING | Widget Javascript not detected. It may not be installed or enabled properly.
and the notebook simply outputs the initial value of the function with no interactivity.
---
I'm running SageMath 8.1 on macOS. I've been able to get interact elements and ipywidgets with SageMath code running in the SageMath jupyter notebook interface (not sure if this was necessary, but I ran
`/local/bin/jupyter nbextension enable --py widgetsnbextension`
in the SageMath directory.) Everything works as expected, i.e. if I run `sagemath -n jupyter` and open a notebook containing:
>import ipywidgets as widgets
>
>widgets.IntSlider(
value=7,
min=0,
max=10,
step=1,
description='Test:',
disabled=False,
continuous_update=False,
orientation='horizontal',
readout=True,
readout_format='d'
)
I get a slider widget which works.
Similarly, examples from this [interact tutorial](https://wiki.sagemath.org/interact/graphics) on the SageMath wiki run perfectly fine in SageMath jupyter.
I also have an up-to-date anaconda install of jupyter where the ipywidgets nbextension has been enabled; the above ipywidgets code can be run in anaconda jupyter with the ordinary python kernel and works fine.
----
[The real reason I am asking this question is I would like to figure out how to get interactive widgets working in jupyterlab with the SageMath kernel, but I'm guessing that if the above question can be answered, I can get everything else working as well.]j.c.Mon, 26 Feb 2018 19:16:26 +0100https://ask.sagemath.org/question/41269/