Anaconda Jupyter WinError2:The system cannot find the file specified

Traceback (most recent call last):
  File "C:\Users\builder\Miniconda3\Scripts\conda-build-script.py", line 4, in <module>
    sys.exit(main())
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 110, in main
    args_func(args, p)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 312, in args_func
    args.func(args, p)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\main_build.py", line 272, in execute
    build.build(m, verbose=not args.quiet, post=post)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\build.py", line 365, in build
    windows.build(m)
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\windows.py", line 95, in build
    env.update(environ.get_dict(m))
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\environ.py", line 94, in get_dict
    d.update(**get_git_build_info(d['SRC_DIR']))
  File "C:\Users\builder\Miniconda3\lib\site-packages\conda_build\environ.py", line 47, in get_git_build_info
    env=env)
  File "C:\Users\builder\Miniconda3\lib\subprocess.py", line 858, in __init__
    restore_signals, start_new_session)
  File "C:\Users\builder\Miniconda3\lib\subprocess.py", line 1111, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

貌似这个问题是因为以前装Anaconda,后来卸载之后重新装,发现不能解决问题,开始是jupyter qtconsole不能用,后来变成了jupyter notebook也不能用了,于是上网看解决这个问题的方法,貌似是因为已经建立了一个kernel,但是这个kernel的地址和anaconda默认的地址不一致,所以需要重新设置地址。

解决办法也很简单
打开CMD或者Powershell, 输入

jupyter kernelspec list

会显示出你所有的kernel,然后将其删除,比如kernel的名字叫做python3,输入

jupyter kernelspec remove python3

然后输入

jupyter kernelspec install-self --user

这样就可以重新打开qtconsole和notebook了

Reference:

  1. https://github.com/conda/conda-build/issues/331
  2. http://stackoverflow.com/questions/35697794/ipython-kernel-error-after-uninstalling-anaconda

posted on 2017-04-01 02:26  kinsly  阅读(1893)  评论(0编辑  收藏  举报

导航