Python Binance API错误

发布于 2025-01-25 22:01:21 字数 715 浏览 2 评论 0原文

当我尝试使用Binance API时,我会收到此错误:

Traceback (most recent call last):
  File "/Users/lironmeir/Documents/Py/trad/main.py", line 1, in <module>
    from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/binance/__init__.py", line 9, in <module>
    from binance.client import Client, AsyncClient  # noqa
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/binance/client.py", line 3, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

安装在正确的文件夹中的库,一切都很好,但是某处出现了问题,我只是无法设法使用API​​。

When I try to work with the Binance API I get this error:

Traceback (most recent call last):
  File "/Users/lironmeir/Documents/Py/trad/main.py", line 1, in <module>
    from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/binance/__init__.py", line 9, in <module>
    from binance.client import Client, AsyncClient  # noqa
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/binance/client.py", line 3, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

The library installed in the right folder and everything is fine but something went wrong somewhere and I just can't manage to work with the API.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

被你宠の有点坏 2025-02-01 22:01:21

您的Env中未安装“ AIOHTTP”库。激活您的env并安装“ AIOHTTP”,然后重试

The "aiohttp" library is not installed in your env. Activate your env and install "aiohttp" and try again

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文