微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法从 Python 3.8.7 导入 libtorrent

如何解决无法从 Python 3.8.7 导入 libtorrent

所以我试图从 python 文件导入 libtorrent 来制作一些下载 torrent 的代码,但是当我导入它时,它返回以下错误

Traceback (most recent call last):
  File "/Users/myUser/Documents/someDirectory/test.py",line 1,in <module>
    import libtorrent
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/libtorrent.so,2): no suitable image found.  Did find:
        /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/libtorrent.so: unkNown file type,first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03
        /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/libtorrent.so: unkNown file type,first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

我使用的是 macOS Mojave 10.14.6。谢谢,这会很有帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。