Replies: 2 comments
-
Hi! Please check out this wiki I just wrote as I think the "shellStartup" setting for the Python Environments Extension might be what you are looking for: https://github.com/microsoft/vscode-python-environments/wiki/Terminal-Auto%E2%80%90Activation-Explained |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion and wiki. Note: The activation of python environment works fine whenever I open a new terminal without sending any "run selection" code. However, when a new
I will answer the questions at the end of the wiki:
If Command mode:
However, when a new
Activation command that works outside VS Code:
Only happens in
Yes, I reloaded the window and restarted VSCode after any settings changes. I think I will change to bash as the default shell. But this might be a bug with VSCode + zsh. I would appreciate if someone could try to reproduce.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
In the last few months I have had an issue with run selection (shift + enter) that has been difficult for me to debug and fix. When selecting code and pressing Shift + Enter I expect i) the correct virtual environment to activate (in this case conda), ii) Python interpreter to activate, iii) the selected code to be sent to python interpreter in terminal and be executed.
A couple of months ago my VSCode began executing these in the incorrect order.
or
With
python.terminal.activateEnvrionment: true
:Sometimes the order of execution is different:
I have tried toggling a bunch of different settings. Among them
"python.terminal.activateEnvironment"
and"python.terminal.activateEnvInCurrentTerminal"
.The only thing that sort of works is if I set both of the above to
false
. If I do this then:But this of course sacrifices auto-activating python environments when starting a terminal.
Do you have any suggestions for settings I can try, and how I can go about to debug this? I tried uninstalling Python Environments extension, but it had no effect.
Info:
Beta Was this translation helpful? Give feedback.
All reactions