Open savvn001 opened 1 year ago
Hi, sorry but I may be mis understanding. Why is another python interpreter being used when I start the debugger vs when I run the LLDB: Command Prompt command in VSCode? Is that by design?
Ah, sorry, misread the report. The debugger should be using the bundled Python, but I guess system Python somehow managed to take precedence. (Did macos recently upgrade to Python 3.9?)
Ah might that be it? That Python3.9 that is being used, looks like some system Python that was installed recently, I've been doing some xcode development recently and I think it was created around that time. Does this extension look for some environment variable or something when the debugger starts?
Could that be overridden with some flags on init as a quick workaround?
Try 'pip install --user numpy'. In this case it shouldn't matter which Python gets used.
Doesn't solve the issue unfourtunately. If I go to LLDB: Command Prompt command and do:
(lldb) pip list --user
Package Version
------------------- -------
contourpy 1.0.7
cycler 0.11.0
fonttools 4.39.3
importlib-resources 5.12.0
kiwisolver 1.4.4
matplotlib 3.7.1
numpy 1.23.5
packaging 23.0
pandas 1.5.1
Pillow 9.5.0
plotly 5.11.0
pyparsing 3.0.9
python-dateutil 2.8.2
pytz 2022.6
six 1.16.0
tenacity 8.1.0
zipp 3.15.0
I can see all my needed packages are installed.
If I do 'pip install --user numpy'.
It will say requirements already satisfied.
OS: macOS 13.3, M1 MBA VSCode version:
Version: 1.77.2 (Universal) Commit: e344f1f539a80912a0e9357cec841f36ce97a4e2 Date: 2023-04-06T10:12:31.126Z (6 days ago) Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Darwin arm64 22.4.0 Sandboxed: No CodeLLDB version: v1.9.0 Compiler: clang
Hi, I had a debug configuration using this extension where a Python script was loaded on init. This was added to the debug config:
The script imports numpy, now the issue is, I'm getting a
ModuleNotFoundError: No module named 'numpy'
when I start the debugger. Previously this was all working fine because I'd gone to "LLDB Command Prompt" and installed the package. I did the "LLDB Command Prompt" command again and didpip list
. It seems the package numpy and others I installed are still there, great. But why can't the debugger find it on launch? If I comment out theinitCommands
, and start the debugger, i tried to find what interpreter it had loaded by using these commands:If I go back to "LLDB Command Prompt" and do the same commands:
So I'm not sure what's going on here. It looks like when the debugger is started, it's not using the same python interpreter as when I do "LLDB Command Prompt" because otherwise it would have the numpy package installed. Can this be overridden somehow?