jupyter-notebook安裝
在網上看到大多數是直接一條指令:
pip install jupyter
後面要將這個環境下的內核加入Jupyter中的時候僅僅安裝jupyter是不夠的,所以應該安順序安裝ipython和jupyter纔行:
# 更新pip
pip install --upgrade pip
pip install ipython
pip install jupyter
安裝好了之後,如果想加入新的內核:
輸入如下指令:
ipython kernel install --user --name <虛擬環境名稱>
# 例如我的一個虛擬環境名稱爲tf2.0:
ipython kernel install --user --name tf2.0
如果想刪除這個內核呢?輸入如下指令:
jupyter kernelspec remove tf2.0
python3.5環境下安裝好IPython和jupyter,輸入Jupyter-notebook報錯:
相信不少同志一定是卸載Jupyter,安裝jupyter,卸載jupyter,安裝。。。。直到懷疑人生。。。,出這個錯誤的原因不是別的,是python版本的問題,將python升級爲3.6就好了,具體參看這篇博客:
https://www.codenong.com/55210213/
python3.6輸入ipython kernel install…報錯
好了,按照上面說的將python3.5換成3.6瞭解決了上面的問題,但是新的問題又出來了:
解決方法是:
將原來的prompt-toolkit-3.0.2版本降爲 2.0.10版本:
pip install prompt-toolkit==2.0.10
成功~
更多操作的參照這篇博客:
https://blog.csdn.net/xkKevin/article/details/103491181