Anaconda interfering with vscode

I have both vscode and anaconda on my windows desktop. Both can be used to run julia and python.

Each time I start vscode and try to run a julia script, I get the error:

[ Info: Precompiling VSCodeServer [9f5989ce-84fe-42d4-91ec-6a7a8d53ed0f]
julia> D:/Anaconda/Scripts/activate
ERROR: syntax: "/" is not a unary operator
Stacktrace:
 [1] top-level scope
   @ none:1

julia> conda activate base
ERROR: syntax: extra token "activate" after end of expression
Stacktrace:
 [1] top-level scope
   @ none:1

I got the error message for the first run, but if I ran the script again, it went through.

It seems that anaconda is interfering with my vscode. How can I clean up my settings?

Not sure I understand - are you saying VSCode automatically sends D:/Anaconda/Scripts/activate to your Julia REPL or is this something you input?

not my input.

I did not do anything. As a newbie, I simply click the triangle button on the upper right corner to run the script.

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).

According to Using Python Environments in Visual Studio Code.

2 Likes