{"id":100,"date":"2019-01-05T11:45:18","date_gmt":"2019-01-05T03:45:18","guid":{"rendered":"http:\/\/www.threebrush.com\/wordpress\/?p=100"},"modified":"2022-01-24T14:06:08","modified_gmt":"2022-01-24T06:06:08","slug":"jupyter-notebookchangedefaultdir","status":"publish","type":"post","link":"http:\/\/www.threebrush.com\/wordpress\/index.php\/2019\/01\/05\/jupyter-notebookchangedefaultdir\/","title":{"rendered":"Jupyter notebook\u6539\u53d8\u9ed8\u8ba4\u7684\u7684\u5de5\u4f5c\u76ee\u5f55"},"content":{"rendered":"<p>\u9ed8\u8ba4\u7684\u201cnotebook\u5de5\u4f5c\u6587\u4ef6\u5939\u201d\u4e0d\u662f\u4e00\u4e2a\u7a7a\u7684\u6587\u4ef6\u5939\uff0c\u5982\u4f55\u4fee\u6539\u4f60\u7684\u201cnotebook\u5de5\u4f5c\u6587\u4ef6\u5939\u201d\u5462\uff1f<\/p>\n<p>1\uff09\u627e\u5230notebook\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u5728~\/.jupyter\/jupyter_notebook_config.py\uff0c\u4e00\u822c\u5b89\u88c5\u540e\u6ca1\u6709\u8fd9\u4e2a\u6587\u4ef6\uff0c\u9700\u8981\u5728Anaconda Prompt\u7ec8\u7aef\u4e2d\u8f93\u5165\u4e0b\u9762\u547d\u4ee4\uff0c\u751f\u6210notebook\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p><strong>jupyter notebook &#8211;generate-config<\/strong><\/p>\n<p>\u547d\u4ee4\u6267\u884c\u540e\u5982\u679c\u4e4b\u524d\u6ca1\u6709\u4f1a\u751f\u6210\u65b0\u6587\u4ef6\uff0c\u63d0\u793a<\/p>\n<p>Writing default config to: C:\\Users\\wanggg\\.jupyter\\jupyter_notebook_config.py<\/p>\n<p>\u5982\u679c\u4ee5\u524d\u6709\u8fd9\u4e2a\u6587\u4ef6\uff0c\u4f1a\u63d0\u793a\u662f\u5426\u7528\u9ed8\u8ba4\u914d\u7f6e\u8986\u76d6\uff0c\u5982\u679c\u5df2\u7ecf\u4fee\u6539\u8fc7\u914d\u7f6e\uff0c\u8f93\u5165N<\/p>\n<p>Overwrite C:\\Users\\wanggg\\.jupyter\\jupyter_notebook_config.py with default config? [y\/N]<\/p>\n<p>\u6839\u636e\u63d0\u793a\u663e\u793a\u7684\u8def\u5f84\uff0c\u6253\u5f00\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>2\uff09\u901a\u8fc7\u641c\u7d22\u5173\u952e\u8bcd\uff1ac.NotebookApp.notebook_dir\uff0c\u5b9a\u4f4d\u5230\u4e0b\u9762\u8fd9\u884c<\/p>\n<p>\u7136\u540e\u4fee\u6539\u6210\u4ee5\u4e0b\u4f60\u81ea\u5df1\u7684\u201cnotebook\u5de5\u4f5c\u6587\u4ef6\u5939\u201d\uff0c\u4fee\u6539\u540e\u8bb0\u5f97\u4fdd\u5b58\u6587\u4ef6\u3002<\/p>\n<p>\u6ce8\u610f\u8981\u53bb\u6389\u8fd9\u884c\u524d\u9762\u7684#\uff08#\u5728\u8868\u793a\u6ce8\u91ca\u6389\u4e0d\u8d77\u4f5c\u7528\uff09\uff0c\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u7535\u8111\u8def\u5f84\u4e0d\u4e00\u6837\uff0cwindows\u662f\u53cc\u659c\u6760\uff08\\\\\uff09\uff0clinux\u662f\u53cd\u659c\u6760\uff08\/\uff09\uff0cMac\u8def\u5f84\u6700\u597d\u81ea\u5df1\u767e\u5ea6\u4e0b\uff0c\u53e6\u5916\u6587\u4ef6\u5939\u7684\u7ed3\u5c3e\u8981\u4ee5\u659c\u6760\u7ed3\u675f\u3002<\/p>\n<p>\u5982windows\u4e0b\u9762<\/p>\n<p>c.NotebookApp.notebook_dir = u&#8217;D:\\\\git_my\\\\threebrush\\\\pythonwork\\\\jupyter\\\\&#8217;<\/p>\n<p>3\uff09\u7136\u540e\u91cd\u542fnotebook\u670d\u52a1\u5668\u5c31\u53ef\u4ee5\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9ed8\u8ba4\u7684\u201cnotebook\u5de5\u4f5c\u6587\u4ef6\u5939\u201d\u4e0d\u662f\u4e00\u4e2a\u7a7a\u7684\u6587\u4ef6\u5939\uff0c\u5982\u4f55\u4fee\u6539\u4f60\u7684\u201cnoteb&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/100"}],"collection":[{"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":1,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":101,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions\/101"}],"wp:attachment":[{"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.threebrush.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}