Skip to content

Virtualenvs not displaying in interpreter selector #1663

@bjlange

Description

@bjlange

Environment data

  • VS Code version: 1.23.1
  • Extension version (available under the Extensions sidebar): 2018.4.0
  • OS and version: macOS Sierra, 10.12.6 (16G1314)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.1 (installed via pyenv)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

No virtualenv interpreters show up in the interpreter selector.

Expected behavior

My virtualenv interpreters would be selectable in the interpreter selector.

Steps to reproduce:

  1. Open the command palette
  2. Select Python: Select Interpreter
  3. Only my pyenv interpreters and system interpreters are displayed (no virtualenvs)

I'll note that this used to work fine. I installed pyenv recently to manage python versions on my machine.. I'm not certain that this problem began immediately after I did that, but that might have been the cause.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

nothing related to this problem (just pylint outputs for the file I have open)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

[Extension Host] Python Extension (lookForInterpretersInVenvs): TypeError: Cannot read property 'on' of undefined
	at on (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/common/process/proc.js:93:15)
	at ProcessService.exec (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/common/process/proc.js:104:9)
	at InterpreterVersionService.<anonymous> (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/interpreterVersion.js:30:40)
	at Generator.next (<anonymous>)
	at /Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/interpreterVersion.js:16:71
	at Promise (<anonymous>)
	at __awaiter (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/interpreterVersion.js:12:12)
	at InterpreterVersionService.getVersion (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/interpreterVersion.js:29:16)
	at WorkspaceVirtualEnvService.<anonymous> (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:83:38)
	at Generator.next (<anonymous>)
	at /Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:16:71
	at Promise (<anonymous>)
	at __awaiter (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:12:12)
	at WorkspaceVirtualEnvService.getVirtualEnvDetails (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:81:16)
	at Promise.all.interpreters.map.interpreter (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:55:88)
	at Array.map (native)
	at fileSystem.getSubDirectoriesAsync.then.then.then.then.then.interpreters (/Users/brian/.vscode/extensions/ms-python.python-2018.4.0/out/client/interpreter/locators/services/baseVirtualEnvService.js:55:64)
	at <anonymous>
t.log @ console.ts:136

followed by this, for each of my virtualenvs:

 ERR spawn /Users/brian/.virtualenvs/teamster/bin/python2.7 EAGAIN: Error: spawn /Users/brian/.virtualenvs/teamster/bin/python2.7 EAGAIN
	at exports._errnoException (util.js:1050:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
	at onErrorNT (internal/child_process.js:367:16)
	at _combinedTickCallback (internal/process/next_tick.js:80:11)
	at process._tickCallback (internal/process/next_tick.js:104:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bugmacos

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions