jupyter notebook同時使用python2和python3

jupyter notebook同時使用python2和python3

 

若是默認使用python3則可用如下命令激活py27的虛擬環境,將python27的python.exe更名爲python2.exe,環境變量均加入進去,輸入命令:python

 python2 -m ipykernel install --user spa

 

啓動jupyter notebook去查看,這時能夠看到,python2的kernel已經安裝好了。code

 

快速啓動jupyter notebook的一個小技巧

啓動jupyter notebook時,每次都要切換文件路徑,須要輸入相關的命令,相對來講比較麻煩。 有一個能夠快速啓動的小技巧,我我的通常是這麼用的。blog

在你想要打開的文件夾路徑下,建立一個後綴爲「.bat」的文件(好比命名爲 ipy.bat),用記事本打開這個文件,輸入以下內容並保存。ip

rem -- start_ipython_notebook_here.bat ---
dir
jupyter notebook
pause

之後雙擊這個 ipy.bat文件,就能夠快速啓動jupyter notebook。我通常會把這個 ipy.bat文件以快捷方式發送到桌面(純懶人的作法~~)。rem

相關文章
相關標籤/搜索