如何修复modulenotfounderror:no模块名为' terra_proto.terra'
我目前已经安装了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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了解决方案:pip install terra-proto == 1.0.0
I've found the solution: pip install terra-proto==1.0.0
你经营这个吗?
从文档 https:// github。 com/terra-money/terra.py/tree/v2.0.6#依赖项
Terra-proto
似乎在依赖项列表中Did you run this?
from documentation https://github.com/terra-money/terra.py/tree/v2.0.6#dependencies
terra-proto
seems to be in the list of dependencies