-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundled Python interpreter not being used in debugger #909
Comments
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:
I can see all my needed packages are installed. |
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 the
initCommands
, 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?
The text was updated successfully, but these errors were encountered: