Im running into an issue where I'm running Python 3.7.7, and installed asyncio using

pip3 install asyncio

However, when I run this in the terminal:


import asyncio

正规365体育投注I get the following error:

Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/__init__.py", line 8, in <module>
        from .base_events import *
      File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 23, in <module>
        import socket
      File "/Users/me/socket.py", line 1, in <module>
        import tornado.ioloop
      File "/usr/local/lib/python3.7/site-packages/tornado/ioloop.py", line 45, in <module>
        from tornado.concurrent import (
      File "/usr/local/lib/python3.7/site-packages/tornado/concurrent.py", line 47, in <module>
        Future = asyncio.Future
    AttributeError: module 'asyncio' has no attribute 'Future'

I can most definitely see that asyncio has the Futures attribute. Not sure why its giving me this exception. Any thoughts on what it could be?

  • "The asyncio module is part of the Python standard library since Python 3.4", you did not need install it. – agnewee Apr 2 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.