About that, I dealt with that for a test installation if 
jupyterhub/jupyterlab i am working in at my university. 

My solution consisted in two parts:

1) Copying the threejs files to a directory where the jupyterhub server can 
serve them (in my case, it was /usr/local/share/jupyterhub/static/ )
2) Patching sage to look for those files in the new addresses

The relevant part of my patch is:

diff --git a/src/sage/repl/rich_output/backend_ipython.py b/src/sage/repl/
rich_output/backend_ipython.py
index 5085c3d..8f93d06 100644
--- a/src/sage/repl/rich_output/backend_ipython.py
+++ b/src/sage/repl/rich_output/backend_ipython.py
@@ -593,8 +593,8 @@ class BackendIPythonNotebook(BackendIPython):
         from sage.repl.rich_output import get_display_manager
         CDN_scripts = get_display_manager().threejs_scripts(online=True)
         return """
-<script src="/nbextensions/threejs/three.min.js"></script>
-<script src="/nbextensions/threejs/OrbitControls.js"></script>
+<script src="/static/threejs/three.min.js"></script>
+<script src="/static/threejs/OrbitControls.js"></script>
 <script>
   if ( !window.THREE ) document.write('{}');
 </script>



El martes, 12 de febrero de 2019, 9:20:48 (UTC+1), Jeroen Demeyer escribió:
>
> > Why neither nbviewer nor binder are able to find 
> > (or serve or ?) these javascript files? 
>
> The problem is these lines in src/sage/repl/rich_output/backend_ipython.py 
>
> <script src="/nbextensions/threejs/three.min.js"></script> 
> <script src="/nbextensions/threejs/OrbitControls.js"></script> 
>
> These paths should be changed to take into account the base URL of the 
> server (don't ask me *how* to do this precisely). 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to