Is version 2.0.0 for Python 3 only? It doesn't work on 2.7 for me.
Closed this issue · 1 comments
Hi, is new version compatible with Python 3 only? I was trying to make it work on Python 2.7 and I was not successful. I ommited pip packages which are for Python 3 only (aiohttp, aiodns) and installed cmc and remaining packages (asyncio, numpy, pandas, tqdm) via pip.
There is error with urllib library import on coinmarketcap program start:
[jakub@t1 ~]$ coinmarketcap
Traceback (most recent call last):
File "/usr/bin/coinmarketcap", line 3, in <module>
from cmc import coinmarketcap
File "/usr/lib/python2.7/site-packages/cmc/__init__.py", line 1, in <module>
from .utils import utils
File "/usr/lib/python2.7/site-packages/cmc/utils/utils.py", line 1, in <module>
import urllib.request as urllib
ImportError: No module named request
[jakub@t1 ~]$
According to https://stackoverflow.com/questions/24652074/importerror-no-module-named-request it's needed to import urllib.request differently for Python 2.7 and there are possible more errors.
TLDR: Do you plan to maintain code Python 2.7 or is new version supposed to be for Python 3 only? Thank you.
Hi @childintime, pardon the late response.
Due to the use of asyncio, cmc currently only offers support for python 3. I'm considering changing the structure of the project as to allow for cmc's use in python 2 (although python 2 implementations may experience slower runtimes than python 3).
i'll post updates here as soon as I find a good solution. In the meantime, suggestions and PRs are welcome :)