Virtualenvs not displaying in interpreter selector
See original GitHub issueEnvironment 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:
- Open the command palette
- Select
Python: Select Interpreter
- 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 (View
→Output
, 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)
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Virtualenvs not displaying in interpreter selector #1663 - GitHub
Open the command palette; Select Python : Select Interpreter; Only my pyenv interpreters and system interpreters are displayed (no virtualenvs).
Read more >Python not showing existing venv in interpreter select
I tried adding it to the list by using the command python:select interpreter and then finding the python.exe inside the venv/scripts folder, ...
Read more >Configure a virtual environment | PyCharm Documentation
Create a virtualenv environment. Do one of the following: Click the Python Interpreter selector and choose Add New Interpreter.
Read more >Using Python environments in VS Code
The Python: Select Interpreter command displays a list of available global environments, conda environments, and virtual environments. (See the Where the ...
Read more >Python Virtual Envrironment in VS Code - YouTube
Python #VSCodeSetting up a python virtual environment in VS Code can be tricky, especially selecting the python interpreter appropriate for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
One of the recent updates seems to have resolved the problem for me. Closing…
@d3r3kk Thanks, didn’t realize the bot opened this. Lol