-
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
Activate Environment activates even in REPLs from other languages #23947
Comments
Hello @toihr Thank you for filing the issue here. When you say you have the activate environment setting checked, are you referring to the very first one in the screenshot?: |
@anthonykim1, yes i have Activate Environment in all Terminals created checked. I understand that this kinda means that it will activate on all Terminals. But the problem is if its not activated the environment never activates, and if I have it activated it interjects into my Julia Terminal. This behaviour is mentioned in julia-vscode/julia-vscode#1901 which discuesses this, even though it fails to find a solution on the Julia side. An alternative solution would be if I could specify a batch script to run before the python run commands that just contain conda activate environment_name. |
I think the workaround that was mentioned in the referenced issue is adding: julia-vscode/julia-vscode#1901 (comment) I'm curious to investigate more on this: When your terminal activates, do you ever see the line of command that is the actual activate script? Also, one more thing: Does adding "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]," in your settings.json cause any change? Make sure to "Python Clear Cache and Reload" after you have added any new settings. |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Type: Bug
Behaviour
When having the Activate Environments setting checked, the Python extension tries to activate in REPLs from other Languages i.e. Julia REPL, which is a problem as conda activate .... is not a valid Julia Code.
Steps to reproduce:
When wanting to execute a Julia Script "Julia Execute Active File in REPL"
the conda activate ... line is always, sometimes even twice.
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.12.3
VS Code version: Code 1.92.1 (eaa41d57266683296de7d118f574d0c2652e1fc4, 2024-08-07T20:16:39.455Z)
OS version: Windows_NT x64 10.0.22635
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: