Skip to content

Select Interpreter failed to find 64-bit python installation due to wrong IInterpreterLocatorService parameter. #414

Closed

Description

Environment data

VS Code version: 1.18.1
Python Extension version: 0.8.0
Python Version: python 3.6.3 64-bit & python 2.7.14 64-bit
OS and version: Windows 10.0.16299.64

Actual behavior

image

Expected behavior

image

Steps to reproduce:

Here is my exploration by debugging this extension myself:
The extension cannot find 64-bit python installation via WindowsRegistryService class which implements interface IInterpreterLocatorService
the code is here: windowsRegistryService.ts
In short, this class find python installation via predefined registry path, it does resolved the correct registry path: \Software\Python\PythonCore\2.7\InstallPath and \Software\Python\PythonCore\2.7\InstallPath, but due to the is64Bit member of the class set to false in constructor, it cannot find anything in the 32-bit(?) registry.
After manualy changing this.is64Bit member of WindowsRegistryService to true in the debugger, the class can correctly find both of the 2 python interpreters, and tagged it as 64-bit.

Looking at the constructor, the is64Bit parameter is injected by some other mechanism, which I cannot understand by looking at the code, can anyone explain it?

image

for now, the interpreter locator falls back to find python via PATH and returns only 1 python.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions