2017-04-05 45 views

回答

3
  1. 运行这在笔记本找出你jupyter目录:

    from jupyter_core.paths import jupyter_config_dir 
    jupyter_dir = jupyter_config_dir() 
    jupyter_dir 
    
  2. 创建文件夹命名为“ jupyter目录下自定义”从上面 /定制

  3. 发现创建custom.js下/custom/custom.js文件,并添加以下

    requirejs.config({ 
    paths: { 
        d3: 'd3.min', 
    } 
    }); 
    
  4. 打开为您的配置文件创建的jupyter_notebook_config.py。如果未创建它,使用以下方法来创建一个命令行/终端

    jupyter notebook --generate-config 
    
  5. 在jupyter_notebook_config.py修改静态路径为您的JS文件夹(从生成-config命令创建的)象下面

    c.NotebookApp.extra_static_paths = ["C:\your-js-folder"] 
    
  6. 放下你的外部JS下的C文件:\您的JS文件夹以及停止和启动jupyter笔记本

相关问题