rLoper
rLoper

Reputation: 73

Jupyter fails to run after Scikit-learn package upgrade: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'

I had some issues regarding Keras wrapper and VotingClassifier so I tried upgrading sci-kit learn through Conda. But now when I try to launch it from Navigator or from a shortcut, it starts the prompt for a brief moment and then it closes. Anaconda cough this error:

Traceback (most recent call last):
File "C:\Users\vucin\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in 
from notebook.notebookapp import main
File "C:\Users\vucin\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 47, in 
from zmq.eventloop import ioloop
File "C:\Users\vucin\Anaconda3\lib\site-packages\zmq\eventloop\__init__.py", line 3, in 
from zmq.eventloop.ioloop import IOLoop
File "C:\Users\vucin\Anaconda3\lib\site-packages\zmq\eventloop\ioloop.py", line 78, in 
while _IOLoop.configurable_default() is not _IOLoop:
File "C:\Users\vucin\Anaconda3\lib\site-packages\tornado\ioloop.py", line 328, in configurable_default
from tornado.platform.asyncio import AsyncIOLoop
File "C:\Users\vucin\Anaconda3\lib\site-packages\tornado\platform\asyncio.py", line 34, in 
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
AttributeError: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'

Since it got to Windows something something, I only guess that the backend is messed up badly and I don't know what to do. Uinstall is my last option since I am runing this on an old AMD based laptop and only God knows how I got Keras to run. Thanks!

Upvotes: 1

Views: 487

Answers (1)

Mikko Ohtamaa
Mikko Ohtamaa

Reputation: 83556

This is the error

AttributeError: module 'asyncio' has no attribute 'WindowsSelectorEventLoopPolicy'

If you Google the error you get someone having the same error in a different context and the suggestion is to upgrade your Python version.

As you did not mention your Python version in the question, it might worth to checl out.

You can also find this mentioned in Python release notes with some luck of Googling

Upvotes: 1

Related Questions