2017-04-05 117 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筆記本

相關問題