evyatarmeged/Raccoon

asyncio SyntaxError: invalid syntax

P0nt05 opened this issue · 2 comments

python raccoon_src/main.py
Traceback (most recent call last):
File "raccoon_src/main.py", line 2, in
import asyncio
ImportError: No module named asyncio

pip install asyncio
Collecting asyncio
Downloading https://files.pythonhosted.org/packages/da/54/054bafaf2c0fb8473d423743e191fcdf49b2c1fd5e9af3524efbe097bafd/asyncio-3.4.3.tar.gz (204kB)
100% |████████████████████████████████| 204kB 1.8MB/s
Building wheels for collected packages: asyncio
Running setup.py bdist_wheel for asyncio ... done
Stored in directory: /root/.cache/pip/wheels/cb/17/5e/49e0ab550783011b8389b67553fd2c9b5453e926f5e36c7a41
Successfully built asyncio
Installing collected packages: asyncio
Successfully installed asyncio-3.4.3

python raccoon_src/main.py
Traceback (most recent call last):
File "raccoon_src/main.py", line 2, in
import asyncio
File "/usr/local/lib/python2.7/dist-packages/asyncio/init.py", line 9, in
from . import selectors
File "/usr/local/lib/python2.7/dist-packages/asyncio/selectors.py", line 39
"{!r}".format(fileobj)) from None
^
SyntaxError: invalid syntax

asyncio requires Python 3.3 or later! The asyncio module is part of the Python standard library since Python 3.4.
From https://pypi.org/project/asyncio/.

Looking at your error you are using python2.7.

Thanks @paulosousa12.
I'll go ahead and close this one.