-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Debugger triggers ImportError when numpy is imported #13500
Comments
We just want to quickly acknowledge that we have received the issue and will be looking into it soon. |
Thanks @karrtikr appreciate it. Shout if you need more info from my end. |
It looks like the code is not running within an activated conda environment when debugging it. Can you try this?
related #10626 |
hi @karrtikr I followed your instructions and the debugger works when I use the Anaconda Prompt to launch |
Thanks I can work with this. Is this the a temporary workaround or are you still figuring out another way to address this more permanently? |
Great, conda activation is a tricky one to get right for us, but we have plans to fix it, until then please use the workaround. Closing in favor of #5344 |
Environment data
python.languageServer
setting: XXX[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]Expected behaviour
Being able to use the step-through debugger.
Actual behaviour
Any import of numpy results in an import Error. However, if the script is run from the terminal, this numpy import error does not occur. In other words, the issue is specific to the VS Code Python Debugger.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
import numpy
will trigger the error when a Python module is executed with "Start Debugging".I tried numpy 1.18.5 and 1.19. I reinstalled VS Code and Miniconda. Problem still remains. I didn't have this issue before.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: