Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x! Clion Mac LLDB debug
When I try to debug my C++ code using LLVM in CLion on Mac I get the following message in the console:
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: "/Users/####/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/183.5429.37/CLion.app/Contents/bin/lldb/renderers"
You should `unset PYTHONPATH` to fix this.
Assertion failed: (e == 0), function ~recursive_mutex, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/libcxx/libcxx-400.9.4/src/mutex.cpp, line 64.
Process finished with exit code 0
I have tried re-installing Clion and changing the python interpreter but nothing changes.
I presume this has nothing to do with the project python interpreter (maybe even nothing to do with Clion) but I have no idea what is going. Is LLDB calling some python scripts? If so I guess it executes with with Python 2 but the 'renderers' in Clion need Python 3?
Please help!
MacOS 10.14.3
Clion 2018.3.4
请先登录再写评论。
Hello! Do you have
PYTHONPATHenvironment variable declared system wide?Hey Mark!
I had the exact same issue and just solved it following this discussion https://intellij-support.jetbrains.com/hc/en-us/community/posts/206755029-Python3-x-in-virtualenv-pyenv-doesn-t-work-with-Python-Console
In short, you have to delete this file /usr/local/lib/python2.7/site-packages/sitecustomize.py
Hope it solves it!