Recently the debugger has started to activate conda environments which is NOT what I want
See original GitHub issue@lovettchris commented on Wed Feb 06 2019
Environment data
- PTVSD version: c:\Users\clovett.vscode\extensions\ms-python.python-2019.1.0\pythonFiles\ptvsd_launcher.py
- OS and version: Win 10 version 1809, build 1773.292
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda python 3.6
- Using VS Code or Visual Studio: VS Code
Actual behavior
Debugging is now doing this, which is NOT what I want, how did this start and how do I disable it? This is what I see in my Terminal output window when trying to debug one of my python scripts:
> cd 'd:\temp\gallery\test'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'd:\Continuum\Anaconda3\envs\tensorflow\python.exe' 'c:\Users\clovett\.vscode\extensions\ms-python.python-2019.1.0\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '51001' 'd:\git\ELL\ELL-training\Gallery\test_models.py' '--path' 'd:\temp\gallery' '--target' 'pi3' '--dataset' '\\aifs\datasets\public\ILSVRC2012 (Imagenet)\ilsvrc.json' '--skip_md' '--categories' '\\aifs\datasets\public\ILSVRC2012 (Imagenet)\ilsvrc.txt' '--max_files' '10' '--logfile' 'test.log' '--skip_md'
PS D:\temp\gallery\test> d:/Continuum/Anaconda3/Scripts/activate PS D:\temp\gallery\test> conda activate tensorflow
Expected behavior
Do not attempt to auto activate a conda environment
Steps to reproduce:
Not sure.
@karthiknadig commented on Wed Feb 06 2019
This is the extension activating it. Moving the issue over to extension repo.
@lovettchris commented on Wed Feb 06 2019
What is odd is that when I use the debug console to look at os.get_exec_path()
I see this path has been added to the console environment in which I launched VS code. I have no idea how or why it was added:
os.get_exec_path()
...
00:'D:\\Continuum\\Anaconda3\\envs\\tensorflow\\Library\\bin'
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Ok, turning off “python.terminal.activateEnvironment” is what I needed thanks. You can close this now.
Thats too specific to conda. We need to suppport pipenv, pyenv, virtualenv, etc.
All i can suggest is setting the interpreter in vsc using
Python: Select Interpreter
command.