重新安装Python 3可以防止Jupyter内核

时间:2018-05-31 10:08:53

标签: python python-3.x anaconda jupyter-notebook jupyter

为了尝试使用Python 3.6重新启动Anaconda,我使用Anaconda-Clean删除了以前的安装并删除了/ anaconda目录。现在,安装了新版本的Anaconda之后,我注意到Jupyter中的内核一直失败,并出现以下错误消息:

[JupyterQtConsoleApp] ERROR | Failed to run command:
['/Users/Sam/anaconda/envs/ipykernel_py3/bin/python', '-m', 'ipykernel_launcher', '-f', '/Users/Sam/Library/Jupyter/runtime/kernel-2368.json']
PATH='/Users/Sam/anaconda3/bin:/usr/bin:/bin:/usr/sbin:/sbin'
with kwargs:
{'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': None, 'start_new_session': True}

Traceback (most recent call last):
File "/Users/Sam/anaconda3/bin/jupyter-qtconsole", line 5, in 
main()
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/qtconsole/qtconsoleapp.py", line 422, in main
JupyterQtConsoleApp.launch_instance()
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/qtconsole/qtconsoleapp.py", line 393, in initialize
JupyterConsoleApp.initialize(self,argv)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_client/consoleapp.py", line 334, in initialize
self.init_kernel_manager()
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_client/consoleapp.py", line 288, in init_kernel_manager
self.kernel_manager.start_kernel(**kwargs)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 259, in start_kernel
**kw)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/Sam/anaconda3/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/Sam/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/Users/Sam/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Sam/anaconda/envs/ipykernel_py3/bin/python': '/Users/Sam/anaconda/envs/ipykernel_py3/bin/python'


值得注意的是,我仍然可以在终端中完美地运行Python(v3.6)。有什么方法可以解决这个问题吗?

0 个答案:

没有答案