mac电脑运行lldb 出现下面错误:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
发现是python@2的原因,记得之前系统自带是有python
,曾经用brew
安装过python
,查看
brew list
结果如下:
image.png
解决办法:
brew remove python@2 --ignore-dependencies
运行lldb
验证:
image.png