从请求导入Session作为OriginalSession ImportError:无法导入名称'Session'

时间:2018-04-07 11:49:47

标签: python session bitcoin coinbase-api

我不明白我得到的错误,在线搜索没有帮助。

Traceback (most recent call last):
  File "/Users/<path>/file.py", line 1, in <module>
    from coinmarketcap import Market
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/coinmarketcap/__init__.py", line 10, in <module>
    from .core import Market
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/coinmarketcap/core.py", line 8, in <module>
    import requests_cache
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests_cache/__init__.py", line 28, in <module>
    from .core import(
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests_cache/core.py", line 14, in <module>
    from requests import Session as OriginalSession
ImportError: cannot import name 'Session'

它似乎是从导入和代码如下的第一行生成的:

from coinmarketcap import Market


cmc = Market()
coins = cmc.ticker(limit=15)  # assumes Dash in top 15.
print(coins)

0 个答案:

没有答案