美文网首页
修复lldb执行python脚本报错No module name

修复lldb执行python脚本报错No module name

作者: 超哥__ | 来源:发表于2021-10-02 12:43 被阅读0次

lldb执行script命令得到错误:

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python3/lldb/__init__.py ModuleNotFoundError: No module named 'six'

在init.py中打印sys.path获取lldb使用的python路径:

/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7

为python3.7安装pip:

export curpypath=/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7
$curpypath -m ensurepip --user
$curpypath -m pip install six --user

此时lldb执行script命令不再报错

相关文章

网友评论

      本文标题:修复lldb执行python脚本报错No module name

      本文链接:https://www.haomeiwen.com/subject/dhzpnltx.html