如何修复modulenotfounderror:no模块名为' terra_proto.terra'

发布于 2025-02-04 08:39:29 字数 956 浏览 3 评论 0原文

我目前已经安装了Terra_sdk == 2.0.6版本,因为尝试使用 Terra的较旧版本Terra 1.0,使其与链条ID哥伦布5兼容。我该如何解决?

from terra_sdk.client.lcd import LCDClient
terra = LCDClient(chain_id = "columbus-5", url="https://lcd.terra.dev")

File ~/Terra /venvT/lib/python3.9/site-packages/terra_sdk/core/market/__init__.py:1, in <module>
----> 1 from .msgs import MsgSwap, MsgSwapSend
      3 __all__ = ["MsgSwap", "MsgSwapSend"]

File ~/Terra /venvT/lib/python3.9/site-packages/terra_sdk/core/market/msgs.py:6, in <module>
      3 from __future__ import annotations
      5 import attr
----> 6 from terra_proto.terra.market.v1beta1 import MsgSwap as MsgSwap_pb
      7 from terra_proto.terra.market.v1beta1 import MsgSwapSend as MsgSwapSend_pb
      9 from terra_sdk.core import AccAddress, Coin

ModuleNotFoundError: No module named 'terra_proto.terra'

I have currently installed the terra_sdk==2.0.6 version because trying to use
Terra's older version the Terra 1.0, so that it's compatible with the chain-id columbus 5. How do I fix this?

from terra_sdk.client.lcd import LCDClient
terra = LCDClient(chain_id = "columbus-5", url="https://lcd.terra.dev")

File ~/Terra /venvT/lib/python3.9/site-packages/terra_sdk/core/market/__init__.py:1, in <module>
----> 1 from .msgs import MsgSwap, MsgSwapSend
      3 __all__ = ["MsgSwap", "MsgSwapSend"]

File ~/Terra /venvT/lib/python3.9/site-packages/terra_sdk/core/market/msgs.py:6, in <module>
      3 from __future__ import annotations
      5 import attr
----> 6 from terra_proto.terra.market.v1beta1 import MsgSwap as MsgSwap_pb
      7 from terra_proto.terra.market.v1beta1 import MsgSwapSend as MsgSwapSend_pb
      9 from terra_sdk.core import AccAddress, Coin

ModuleNotFoundError: No module named 'terra_proto.terra'

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

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

发布评论

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

评论(2

清晰传感 2025-02-11 08:39:29

我找到了解决方案:pip install terra-proto == 1.0.0

I've found the solution: pip install terra-proto==1.0.0

油焖大侠 2025-02-11 08:39:29

你经营这个吗?

Terra SDK使用诗歌来管理依赖关系。与所有人建立
所需的依赖项,运行:

    $ pip install poetry
    $ poetry install

从文档 https:// github。 com/terra-money/terra.py/tree/v2.0.6#依赖项

Terra-proto似乎在依赖项列表中

Did you run this?

Terra SDK uses Poetry to manage dependencies. To get set up with all
the required dependencies, run:

    $ pip install poetry
    $ poetry install

from documentation https://github.com/terra-money/terra.py/tree/v2.0.6#dependencies

terra-proto seems to be in the list of dependencies

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