Anaconda startup shell scripts are loaded into Julia REPL by mistake

Hi everyone! I’m currently using both Anaconda plugin and Julia plugin in VS Code. When I try to launch a Julia script (through REPL) inside a project where Python scripts exist, Anaconda startup shell scripts would always be loaded and then cause problems:

source /home/zhh/anaconda3/bin/activate
conda activate base
julia> urce /home/zhh/anaconda3/bin/activate
... (the output of the Julia script I'm running)
julia> soERROR: UndefVarError: urce not defined
 [1] top-level scope at REPL[1]:1

julia> conda activate base
ERROR: syntax: extra token "activate" after end of expression
 [1] top-level scope at REPL[2]:1


I know I can just disable Anaconda plugin for this project, but I wonder if there are any other solutions because sometimes I really need both of them in one project (although not at the same time).

As per here, you should be able to disable that with the python.terminal.activateEnvironment setting:

Tip : To prevent automatic activation of a selected environment, add "python.terminal.activateEnvironment": false to your settings.json file (it can be placed anywhere as a sibling to the existing settings).


It works. Thank you!

1 Like