修改Jupyter的工作空間

2022-03-22 16:18:11 字數 1715 閱讀 6381

剛安裝完並配置好sublime text 3後被學長推薦使用jupyter notebook,於是就想著看看試試有沒有他說的那麼好。

這麼大一堆目錄誰知道在哪兒?我新建乙個檔案總得知道我這檔案在哪兒吧,於是乎我便去尋找!

怎麼找呢?

我知道jupyter肯定是在python的安裝目錄下的,於是乎我便去查詢python的安裝目錄:

c:\users\dell>python

python 3.7.0b5 (v3.7.0b5:abb8802389, may 31 2018, 01:54:01) [msc v.1913 64 bit (amd64)] on win32

>>> import sys

>>> sys.path

['', 'e:\\programs\\python37.zip', 'e:\\programs\\dlls', 'e:\\programs\\lib', 'e:\\programs', 'e:\\programs\\lib\\site-packages']

好了我知道python的安裝目錄了:e:\\programs\,於是找到jupyter的安裝目錄:e:\\programs\scripts(一般都是在scripts目錄下),於是一頓操作:

c:\users\dell>e:

e:\>cd e:\programs\scripts

e:\programs\scripts>jupyter notebook --generate-config

writing default config to: c:\users\dell\.jupyter\jupyter_notebook_config.py

## the directory to use for notebooks and kernels.
將其修改成為你像存放的目錄。儲存,重啟jupyter後就會發現修改完成!

c:\users\dell>jupyter notebook password

enter password:

verify password:

in [1]: from notebook.auth import passwd

in [2]: passwd()

enter password:

verify password:

out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed 這一串就是要在 jupyter_notebook_config.py 新增的密碼。

}

jupyter_notebook_config.py中找到下面的行,取消注釋並修改。

以上設定完以後就可以在伺服器上啟動jupyter notebook開啟 ip:指定的埠, 輸入密碼就可以訪問了。

需要注意的是不能在隱藏目錄 (以 . 開頭的目錄)下啟動 jupyter notebook, 否則無法正常訪問檔案。

enjoy the sunshine today!

MyEclipse工作空間路徑的修改

myeclipse工作空間路徑的修改 1 在安裝的路徑下找到 myeclipse configuration settings中的 其中show workspace selection dialog false是啟動時是否顯示選擇工作空間位置true就顯示,false不顯示,為了以後的方便,如果經常...

修改eclipse工作空間的路徑

workspace的路徑選擇視窗丟失了,想修改工作路徑怎麼辦?在eclipse的安裝目錄下找到 configuration settings目錄下,檔案 org.eclipse.ui.ide.prefs tue mar 01 08 37 45 cst 2011 recent workspaces p...

jupyter修改預設路徑

1.生成配置檔案 在開始選單裡找到並開啟anaconda prompt,並執行如下命令 jupyter notebook generate config2.開啟生成配置檔案 檔案位置為上一步的預設資料夾下的 jupyter jupyter notebook config.py例如 c users a...