KEMBAR78
Conda activation is failing · Issue #4402 · microsoft/vscode-python · GitHub
Skip to content

Conda activation is failing #4402

@MarekOzana

Description

@MarekOzana

Environment data

  • VS Code version: 1.3.1
  • Extension version (available under the Extensions sidebar): 2019.1.0
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Miniconda 3.6.6 64-bit ('py36': conda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions:

Expected behaviour

VSC opens interactive python using active py36 environment

Actual behaviour

  1. VSC is open with active ('py36': conda) environment
  2. Python: Show Python Interactive window
  3. Error message:
    Jupyter kernel cannot be started from 'Python 3.6.6 64-bit ('py36': conda)'. Using closest match Python 3.6.6 64-bit ('mro': conda) instead.

Steps to reproduce:

  1. Open VSC in empty directory
  2. Python: Select Interpreter
  3. select 'py36'
  4. Python: Show Python Interactive window

Logs

Relevant Part from Developer Tools > Console Log:

Python Extension: Python Extension (Error in getActivatedEnvironmentVariables, method:getActivatedEnvironmentVariables): 
Error: Command failed: 
C:/Users/marek.ozana.XCF/AppData/Local/Continuum/miniconda3/envs/py36/Scripts/activate && conda activate py36 && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python C:/Users/marek.ozana.XCF/.vscode/extensions/ms-python.python-2019.1.0/pythonFiles/printEnvVariables.py
Could not find conda environment: py36
You can list all discoverable environments with `conda info --envs`.
	at ChildProcess.exithandler (child_process.js:303:12)
	at ChildProcess.emit (events.js:182:13)
	at maybeClose (internal/child_process.js:961:16)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
t.log @ console.ts:134

The problem seems to be that process is already in 'py36' environment and thus fails when trying to activate py36 again:
C:/Users/marek.ozana.XCF/AppData/Local/Continuum/miniconda3/envs/py36/Scripts/activate && conda activate py36

Metadata

Metadata

Assignees

Labels

area-terminalbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions