由jupter notebook:Error executing Jupyter command ‘notebook‘: [Errno ‘jupyter-notebook‘ not found]的思考

昨晚还用得好好的,今天早上一打开,提示有错误


D:\AI>jupyter notebook
Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2

上网查找解决方法

更新

D:\AI>pip3 install --upgrade jupyter

无错,更新后输入jupyter notebook,还是出现同样的问题

换一更新方式

D:\AI>pip3 install --upgrade --force-reinstall --no-cache-dir jupyter

如果是python2版本,将pip3换成pip

问题解决

参考:https://stackoverflow.com/questions/49925555/jupyter-notebook-command-returns-error-executing-jupyter-command-notebook-er

出现了新问题:

打开jupyterNotebook时500 : Internal Server Error

由jupter notebook:Error executing Jupyter command ‘notebook‘: [Errno ‘jupyter-notebook‘ not found]的思考_第1张图片

参考: https://stackoverflow.com/questions/55185563/jupyter-notebook-500-internal-server-error

和 https://github.com/conda-forge/nbconvert-feedstock/issues/27

安装nbconvert5.4.1及以后的版本即可。本文选择更新nbconvert到指定版本5.6.0后,问题解决了

D:\AI>pip3 install --upgrade --user nbconvert==5.6.0

再次出现问题

打开jupyterNotebook时,内核连接不成功

原因:

ModuleNotFoundError: No module named 'contextvars'

During handling of the above exception, another exception occurred:
...
...
...
ImportError: cannot import name 'AsyncGenerator'

原因是prompt_toolkit这依赖的版本不匹配(我这使用的python 3.6)

解决办法是,安装contextvars后,再降低版本prompt_toolkit的版本
pip3 install --upgrade prompt-toolkit==2.0.10

终于全部解决

思考:

1.一定要看引起错误的原因,再针对下药

2.多看模板的文档说明

3.多学习

 

你可能感兴趣的:(由jupter notebook:Error executing Jupyter command ‘notebook‘: [Errno ‘jupyter-notebook‘ not found]的思考)