You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When this extension is installed it causes the command C:/ProgramData/Anaconda and then "conda activate base" to be run in terminal windows, including in REPL windows for other languages. This causes errors before the Python REPL starts.
The interesting thing is that enabling this extension causes the same behavior for other terminals and extensions in VS Code even when they have nothing to do with Python. So all shells start with these two commands whether they make sense or not. Also the first two lines of the Julia REPL are those two lines -- which obviously make no sense as Julia statements.
Turning off the vscode-python extension fixes the problem, but that's a pity.
I'll also note here that when the a Python REPL is started the name given to it is "REPL" which is a bit non-specific as there are other languages that have REPLs. "Python" would be a better name.
Environment data
VS Code version: 1.39.2
Extension version (available under the Extensions sidebar): 2019.10.44104
OS and version: Windows 7
Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 3.6.4
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): None
Relevant/affected Python packages and their versions:
Starting a terminal or REPL unrelated to python should not cause conda start-up commands to run.
Actual behaviour
Opening any new terminal, including a shell or a Julia REPL causes the conda start up commands to run in that shell or REPL, regardless of whether these make sense or can be run. Here is what I see when opening a command shell terminal example:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
(base) C:\Data\Projects\repos\home-dev>conda activate base
(base) C:\Data\Projects\repos\home-dev>
And here is what I see when running Julia: Start REPL
julia> C:/ProgramData/Anaconda3/Scripts/activate
ERROR: syntax: "/" is not a unary operator
julia> conda activate base
ERROR: syntax: extra token "activate" after end of expression
julia>
Steps to reproduce:
Install an Anaconda distribution
Install the extension
Set the python interpreter for VS Code to point to the Anaconda python.
Open a terminal using New Terminal under the Terminal menu.
Disabling the python extension solves the problem and sets the behavior to normal.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
When this extension is installed it causes the command C:/ProgramData/Anaconda and then "conda activate base" to be run in terminal windows, including in REPL windows for other languages. This causes errors before the Python REPL starts.
The interesting thing is that enabling this extension causes the same behavior for other terminals and extensions in VS Code even when they have nothing to do with Python. So all shells start with these two commands whether they make sense or not. Also the first two lines of the Julia REPL are those two lines -- which obviously make no sense as Julia statements.
Turning off the vscode-python extension fixes the problem, but that's a pity.
I'll also note here that when the a Python REPL is started the name given to it is "REPL" which is a bit non-specific as there are other languages that have REPLs. "Python" would be a better name.
Environment data
"python.jediEnabled"set to; more info How to update the language server to the latest stable version #3977): XXXExpected behaviour
Starting a terminal or REPL unrelated to python should not cause conda start-up commands to run.
Actual behaviour
Opening any new terminal, including a shell or a Julia REPL causes the conda start up commands to run in that shell or REPL, regardless of whether these make sense or can be run. Here is what I see when opening a command shell terminal example:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Data\Projects\repos\home-dev>C:/ProgramData/Anaconda3/Scripts/activate
(base) C:\Data\Projects\repos\home-dev>conda activate base
(base) C:\Data\Projects\repos\home-dev>
And here is what I see when running Julia: Start REPL
julia> C:/ProgramData/Anaconda3/Scripts/activate
ERROR: syntax: "/" is not a unary operator
julia> conda activate base
ERROR: syntax: extra token "activate" after end of expression
julia>
Steps to reproduce:
Disabling the python extension solves the problem and sets the behavior to normal.
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging)