!pip install pycoingecko
from pycoingecko import CoingeckoAPI
ImportError Traceback (most recent call last)
<ipython-input-17-0df3e3f44200> in <module>
----> 1 from pycoingecko import CoingeckoAPI
ImportError: cannot import name 'CoingeckoAPI' from 'pycoingecko' (C:ProgramDataAnaconda3libsite-packagespycoingecko__init__.py)
来源https://pypi.org/project/pycoingecko/:
使用
from pycoingecko import CoinGeckoAPI cg = CoinGeckoAPI()
您需要使用CoinGeckoAPI
,而不是CoingeckoAPI
。