1

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!

1
  • This error means your environment is broken versionwise after update. Try downgrading asyncio or find a similar machine with yours and align versions to the working environment. Commented Feb 9, 2020 at 19:12

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

Negative, have to keep python 3.6 for Keras, anything else that I can do?
Pin packages to older versions, a known good version set you had before. Do not try to use the latest versions.
Fixed it, had no choice but to update python to 3.7 then, as expected, came the Tf/Keras problem. I honestly don't know why the wheels didn't work the first time I tried them but this time I just installed them and pip installed and it worked. THanks for the help, I will mark this as an answer!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.