python launcher卸载发生错误,卸载anaconda后出现Ipython内核错误

I'm on ubuntu 14.04. I was running anaconda and I used the conda command (as per this post) to make both python 2 and python 3 available in ipython notebooks. But I just uninstalled anaconda and installed ipython, jupyter and notebook individually inside a virtualenv. Now when I try to create a new notebook I get the following error. As you can see in the last line, it seems to still be referring to the kernel created with anaconda which obviously doesn't exist anymore since I uninstalled anaconda.

Can someone please help me with that issue? Thanks a lot.

Traceback (most recent call last):

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/notebook/base/handlers.py", line 458, in wrapper

result = yield gen.maybe_future(method(self, *args, **kwargs))

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 1008, in run

value = future.result()

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/concurrent.py", line 232, in result

raise_exc_info(self._exc_info)

File "", line 3, in raise_exc_info

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 1014, in run

yielded = self.gen.throw(*exc_info)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/notebook/services/sessions/handlers.py", line 58, in post

sm.create_session(path=path, kernel_name=kernel_name))

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 1008, in run

value = future.result()

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/concurrent.py", line 232, in result

raise_exc_info(self._exc_info)

File "", line 3, in raise_exc_info

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 1014, in run

yielded = self.gen.throw(*exc_info)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/notebook/services/sessions/sessionmanager.py", line 73, in create_session

self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 1008, in run

value = future.result()

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/concurrent.py", line 232, in result

raise_exc_info(self._exc_info)

File "", line 3, in raise_exc_info

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/tornado/gen.py", line 282, in wrapper

yielded = next(result)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel

super(MappingKernelManager, self).start_kernel(**kwargs)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/jupyter_client/multikernelmanager.py", line 109, in start_kernel

km.start_kernel(**kwargs)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/jupyter_client/manager.py", line 244, in start_kernel

**kw)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/jupyter_client/manager.py", line 190, in _launch_kernel

return launch_kernel(kernel_cmd, **kw)

File "/home/joe/.virtualenvs/crissp/lib/python3.4/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel

proc = Popen(cmd, **kwargs)

File "/usr/lib/python3.4/subprocess.py", line 859, in __init__

restore_signals, start_new_session)

File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child

raise child_exception_type(errno_num, err_msg)

FileNotFoundError: [Errno 2] No such file or directory: '/home/joe/anaconda3/envs/py27/bin/python'

解决方案

Run jupyter kernelspec list, and it should tell you where the kernelspecs were installed to. You'll need to remove the folders that are now incorrect.

Alternatively, install a new kernelspec with the ipython you have now installed, as described in the IPython docs. This will replace the kernelspec that was already installed for that version of Python.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值