我在导入pycoingecko时遇到一个错误


!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

相关内容

  • 没有找到相关文章

最新更新