-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
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
visual() / threejs issue with Jupyter Lab #338
Comments
@vukk thanks for reporting, but reading the discourse thread I couldn't understand what is the underlying problem and if there is something we could do about. Will the issue be resolved in jupyterlab (i.e. upstream?) As a sidenote you can use using Polymake
p2 = polytope.Polytope(POINTS=[1 -1 -1; 1 1 -1; 1 -1 1; 1 1 1; 1 0 0], INPUT_LINEALITY=[0 1 0])
visual(p2) without macro magic ;) |
The underlying problem is that the normal jupyter interface has Maybe you could try installing jupyter-require ? But I don't know if this needs any extra stuff in the notebook to make it work. |
This is correct. I'd add that the JupyterLab documentation states:
The pythreejs package seems to be more for writing custom javascript into your notebook for visualization. I'm not sure if it is possible right now for you, and how they work within jupyter, but in the long run I'd look into trying to use native ES6 imports If I was working in frontend/fullstack right now, I'd try to fix this myself. However, I'm unfortunately a bit out of practice and currently deep in the thesis swamp :) |
Thanks a lot for the input, we will try look into this but it might take a bit. If I remember correctly we had plenty of problems getting this to work at all when we started this (and then never really touched it because it was working), but probably things are somewhat better now. |
The following bug seems to be present when using Jupyter Lab notebooks:
Writing
results in
Uncaught ReferenceError: requirejs is not defined
in the web console.Similar issues in other packages, reported elsewhere:
Version information:
JupyterLab Version 3.0.5
Julia 1.5.3
Polymake.jl 0.5.5
Polymake.version()
-> v"4.3.0"Workaround:
ThreeJS works in a classic notebook. Open your notebook as a classic notebook in Jupyter Lab via
Help -> Launch Classic Notebook
.The text was updated successfully, but these errors were encountered: