win10 系统 python3.8 的 Ipython 出现 Exception [WinError 995] 由于线程退出或应用程序请求,已中止 I/O 操作

来源网址 https://www.jianshu.com/p/876cf93f7bbf

               https://github.com/ipython/ipython/issues/12049

 

解决方案是更改源文件,路径:

python:python38-32\lib\asyncio\proactor_events.py

anaconda:

windows 路径 anaconda/Lib/site-packages/asyncio/proactor_events.py

重新安装anaconda以后变成了 anaconda/Lib/asyncio/proactor_events.py

Linux 路径 anaconda3/lib/python3.8/site-packages/asyncio/proactor_events.py

添加以下代码:

766....try:
767........if f is not None:
768............f.result() # may raise
...........if self._stopping: #新加代码
...............raise exceptions.CancelledError("Event loop is stopping") # 新加代码
769........f = self._proactor.recv(self._ssock, 4096)

 

你可能感兴趣的:(各种解决方案,python)