I am trying to load d3 and dimple.js in ipython notebook but its throwing error. I have tried require as well but not able to load please provide me some way out of it
-
You need node.js kernel to run your notenook.swatchai– swatchai2017年04月07日 15:01:34 +00:00Commented Apr 7, 2017 at 15:01
1 Answer 1
Run this in the notebook to find out your jupyter directory:
from jupyter_core.paths import jupyter_config_dir jupyter_dir = jupyter_config_dir() jupyter_dirCreate folder named 'custom' under jupyter directory found from above /custom
Create custom.js file under /custom/custom.js and add following
requirejs.config({ paths: { d3: 'd3.min', } });Open jupyter_notebook_config.py created for your profile. if it is not created ,use the following to create one from the command line/terminal
jupyter notebook --generate-configModify static path for your js folder in jupyter_notebook_config.py(created from generate-config command) like below
c.NotebookApp.extra_static_paths = ["C:\your-js-folder"]Drop your external js file under C:\your-js-folder and stop and start jupyter notebook
Comments
Explore related questions
See similar questions with these tags.