ipython console_Ipython console in Spyder stuck on “connecting to kernel”

可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):

问题:

I am new to python and coming from Matlab and I have installed the latest version of Python(x,y) (2.7.9.0) on my Win 8 64 bit PC.

The problem that I have is that, each time I start Spyder, the default IPython console gets stuck on "connecting to kernel". I can see that a new kernel is launched each time because a new .json file appears in the directory ".ipython\profile_default\security". I can access this kernel by opening a new IPython console by clicking on "connect to an existing kernel" and then browsing to find it, then it works fine (except that the variables I create do not appear in the variable explorer). I can also quit the kernel from this new IPython console but this does not solve my problem because when I launch a new IPython console by clicking on "open an IPython console" or restarting Spyder, it still hangs on "connecting to kernel" and creates a new .json file.

The closest issue that I could find on a forum is this one, the only difference being that I do not have the "import sitecustomize" error in the internal console. I have tried uninstalling Python(x,y) and python but to no avail. Any hint would be really appreciated.

回答1:

I run "Reset Spyder Settings" from the Windows Menu in the Anaconda section.

回答2:

Another possible solution to this problem is to update your pyzmq library to version 14.6.0 or higher, which should fix this problem in Windows 8.

If you are using Anaconda, you just need to do conda update pyzmq

to do that.

回答3:

Removing /anaconda/lib/python2.7/site-packages from PYTHONPATH manager in Spyder solved this for me.

回答4:

Had the same issue. I closed the console window, then opened a new one (CTRL+T) and that fixed it. Problem didn't come back after a restart.

回答5:

A very special thing happened to me, but it raised the same error ("connecting to kernel" freeze on Spyder): a '.' has accidentally slipped into my "pytable.py" file from pandas. Probably I opened it after an error and changed it / saved it accidentally.

So, if you are using anaconda, check if by mistake a file in ...\Continuum\Anaconda\Lib\site-packages was changed ( sort file by date and see if a file was modified today for instance)

After fixing the changed file, everything is back to normal.

回答6:

Try typing these 3 lines from the anaconda command prompt:

conda create -n spyder python=2.7 spyder

activate spyder

spyder

回答7:

Disabling anti-virus helped me resolve this issue instantly. Once the console was displayed, I enabled my anti-virus again.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值