How do I get IPython profile behavior from Jupyter 4.x?

后端 未结 1 1260
清歌不尽
清歌不尽 2020-12-28 21:50

There was official(?) recommendation of running an IPython Notebook server, and creating a profile via

$ ipython profile create nbserver

as r

相关标签:
1条回答
  • 2020-12-28 22:17

    Using some code from this blog post http://www.svds.com/jupyter-notebook-best-practices-for-data-science/ and updating it. The easiest solution appears to be to create an alias, like:

    alias jupyter-nbserver='JUPYTER_CONFIG_DIR=~/.jupyter-nbserver jupyter notebook'
    

    So now you can run the jupyter notebook with a different config via the simple command jupyter-nbserver.

    A more robust solution might involve creating a bash function that changes the environment variable, checks whether there's a config file, if not creating one, then executing, but that's probably overkill. The answer that I give on this related question https://stackoverflow.com/a/32516200/246856 goes into creating the initial config files for a new 'profile'.

    0 讨论(0)
提交回复
热议问题