{"id":4796,"date":"2020-05-31T19:35:35","date_gmt":"2020-05-31T11:35:35","guid":{"rendered":"https:\/\/tommykwan.com\/blog\/?p=4796"},"modified":"2020-05-31T19:35:35","modified_gmt":"2020-05-31T11:35:35","slug":"how-to-change-the-jupyter-start-up-folder","status":"publish","type":"post","link":"https:\/\/tommykwan.com\/blog\/it\/python\/how-to-change-the-jupyter-start-up-folder\/","title":{"rendered":"How to change the Jupyter start-up folder"},"content":{"rendered":"[Ref <a href=\"https:\/\/stackoverflow.com\/questions\/35254852\/how-to-change-the-jupyter-start-up-folder\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/stackoverflow.com\/questions\/35254852\/how-to-change-the-jupyter-start-up-folder<\/a>]\n<p>Use the jupyter notebook config file:<\/p>\n<p>Open\u00a0<code>cmd<\/code>\u00a0(or\u00a0<em>Anaconda Prompt<\/em>) and run\u00a0<code>jupyter notebook --generate-config<\/code>.<\/p>\n<p>This writes a file to\u00a0<code>C:\\Users\\username\\.jupyter\\jupyter_notebook_config.py<\/code>.<\/p>\n<p>Browse to the file location and open it in an Editor<\/p>\n<p>Search for the following line in the file:\u00a0<code>#c.NotebookApp.notebook_dir = ''<\/code><\/p>\n<p>Replace by\u00a0<code>c.NotebookApp.notebook_dir = '\/the\/path\/to\/home\/folder\/'<\/code><\/p>\n<p>Make sure you use forward slashes in your path and use \/home\/user\/ instead of ~\/ for your home directory, backslashes could be used if placed in double quotes even if folder name contains spaces as such :\u00a0<code>\"D:\\yourUserName\\Any Folder\\More Folders\\\"<\/code><\/p>\n<p>Remove the # at the beginning of the line to allow the line to execute<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Ref https:\/\/stackoverflow.com\/questions\/35254852\/how-to-change-the-jupyter-start-up-folder] Use the jupyter notebook config file: Open\u00a0cmd\u00a0(or\u00a0Anaconda Prompt) and run\u00a0jupyter notebook &#8211;generate-config. This writes a file to\u00a0C:\\Users\\username\\.jupyter\\jupyter_notebook_config.py. Browse to the file location and open it in an Editor Search for the following line in the file:\u00a0#c.NotebookApp.notebook_dir = &#8221; Replace by\u00a0c.NotebookApp.notebook_dir = &#8216;\/the\/path\/to\/home\/folder\/&#8217; Make sure you use forward slashes in your path and use<a class=\"read-more \" href=\"https:\/\/tommykwan.com\/blog\/it\/python\/how-to-change-the-jupyter-start-up-folder\/\" title=\"Read More\"> <span class=\"button default\">Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-4796","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/comments?post=4796"}],"version-history":[{"count":1,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4796\/revisions"}],"predecessor-version":[{"id":4797,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/posts\/4796\/revisions\/4797"}],"wp:attachment":[{"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/media?parent=4796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/categories?post=4796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommykwan.com\/blog\/wp-json\/wp\/v2\/tags?post=4796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}