[Bug 44864] New: lldb -python-path (with lldb installed using apt-get install lldb-9) returns an incorrect path

Bug ID 44864
Summary lldb -python-path (with lldb installed using apt-get install lldb-9) returns an incorrect path
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter pierre.vanhoutryve@arm.com
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

Hello,

I installed LLDB using "sudo apt-get install lldb-9" and "lldb-9 -python-path"
returns an incorrect path (does not exist). It returns
"/usr/lib/x86_64-linux-gnu/python3.6/site-packages".

Because of that issue, I was unable to use DExTer
([https://github.com/SNSystems/dexter](https://github.com/SNSystems/dexter)) with that build of LLDB since it relies
on the output of "lldb -P" to find LLDB's Python package.

I tried building LLDB myself to see if the issue occured, but that build
correctly returns "/home/(current user)/lldb/lib/python2.7/dist-packages". (So
after adding my "build/bin" folder to my PATH, I was able to run DExTer)

This happened on my machine running Ubuntu 18.04.3 LTS. I also think that this
happens on pretty much any version of LLDB installed using apt-get.

Kind regards,
Pierre van Houtryve

labath@google.com changed bug 44864

What Removed Added
Resolution FIXED
Status NEW RESOLVED

Comment # 1 on bug 44864 from labath@google.com

There's been a bunch of python changes since 9.0, and I believe this particular
problem should be fixed in newer versions. 9.0 is not getting any new releases,
so we can't do anything about that version. If you can reproduce this on newer
versions (particularly 10.0, which is at the rc stage now), then please reopen
this bug.

Wolfgang Hänsch changed bug 44864

What Removed Added
Resolution FIXED
Version unspecified 12.0
Status RESOLVED REOPENED
CC wh563@yahoo.com

Comment # 2 on bug 44864 from Wolfgang Hänsch

Hello,
I have the same problem with "lldb-12 --python-path". 
It returns "/usr/lib/lib/python3/dist-packages". I found the package at
"/usr/lib/llvm-12/lib/python3/dist-packages".

lldb version 12.0.1
Linux 5.8.0-53-generic #60~20.04.1-Ubuntu SMP 

Best regards
Wolfgang