Path Ipython笔记本,如何设置内核的正确路径

Path Ipython笔记本,如何设置内核的正确路径,path,ipython,anaconda,jupyter,jupyter-notebook,Path,Ipython,Anaconda,Jupyter,Jupyter Notebook,在Windows 7 64位上运行ipyhton notebook并使用python 2内核启动notebook时,我遇到一个错误: Traceback (most recent call last): File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\base\handlers.py", line 436, in wrapper result = yield gen.maybe_future(method(self,

在Windows 7 64位上运行ipyhton notebook并使用python 2内核启动notebook时,我遇到一个错误:

Traceback (most recent call last):
  File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\base\handlers.py", line 436, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\sessions\handlers.py", line 56, in post
    model = sm.create_session(path=path, kernel_name=kernel_name)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 66, in create_session
    kernel_name=kernel_name)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 84, in start_kernel
    **kwargs)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\multikernelmanager.py", line 109, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 244, in start_kernel
    **kw)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 190, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "C:\Users\USER1\Anaconda2\lib\site-packages\jupyter_client\launcher.py", line 115, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "C:\Users\USER1\Anaconda2\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "C:\Users\USER1\Anaconda2\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
我已经做了进一步的调查,并在launcher.py文件中的
proc=Popen(cmd,**kwargs)
之前添加了以下打印行

    print cmd
    print kwargs
现在我看到用cmd调用
proc=Popen(cmd,**kwargs)
=

['C:\\Users\\USER1\\Anaconda2_32bit\\python.exe', '-m', 'ipykernel', '-f', '
C:\\Users\\USER1\\AppData\\Roaming\\jupyter\\runtime\\kernel-a3f46334-4491-4
fef-aeb1-6772b8392954.json']
这是一个问题,因为我的python.exe不在

C:\\Users\\USER1\\Anaconda2_32bit\\python.exe
但是在

C:\\Users\\USER1\\Anaconda2\\python.exe
但是,我已检查了计算机/高级系统设置/高级/环境变量中的路径,并且从未在其中指定
\\Anaconda2\u 32位\\

因此,我怀疑错误路径是在其他地方指定的。这可能在哪里?我如何修复它


此外,我以前在
\\Anaconda2\u 32bit\\
中安装过Anaconda,但我已将其卸载。

ipython的内核已在特殊配置文件中注册 我已运行命令:

ipython kernelspec list
结果是:

Available kernels:
  python2    C:\ProgramData\jupyter\kernels\python2
我查看了
C:\ProgramData\jupyter\kernels\python2\kernel.json
文件,发现python2的路径设置错误。我已经修好了这条路,现在可以走了