jupyter創建新notebook不會出現在當前目錄,卻出現在根目錄 - 問題解決

jupyter創建新notebook不會出現在當前目錄,卻出現在根目錄 - 問題解決

前言

這個問題是筆者在使用jupyter notebook的時候碰到的。

重現步驟:
進入一個資料夾→
'new’一個notebook→
回頭看Files,發現Untitled.ipynb出現在根目錄而非當前目錄

註:這個問題必須是特定版本的jupyter notebook才會出現

解決辦法

一開始猜問題是出在jupyter notebook相關套件,因此使用

pip list | grep jupyter

查看,把能升級的都升級了,但是問題仍舊沒有解決。

後來才發現creating new notebook files not respecting current directory location unless browser refresh這個issue,問答中明確的指出了這個問題是在notebook的版本為5.3.0或5.3.1的時候才會發生。

查看jupyter notebook的版本:

pip list | grep notebook

jupyter notebook --version

結果為:

notebook 5.3.0

使用以下指令升級jupyter notebook:

pip install notebook --upgrade

,之後問題即可成功解決!

參考連結

creating new notebook files not respecting current directory location unless browser refresh

猜你喜欢

转载自blog.csdn.net/keineahnung2345/article/details/85046546