- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.3k
 
Description
Environment data
Version: 1.30.2 (user setup)
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:54:13.295Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.16299
Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.1.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
Expected behaviour
VS Code uses the current interpreter to run jedi.
Actual behaviour
VS Code uses one of the installed interpreter on the computer. Seems to favor the latest versions of python installed.
Steps to reproduce:
- Run VS Code with setting "python.pythonPath" pointing to a Python environment not installed on Windows. The environment is working, but it is not in the Windows Registry. Use python 3.4.x.
 - Let VS Code discover tests, it will work properly, but the Codelens will not appear.
 - Check the Developer Tools log:
 
jediProxy, Error (stderr)     import _socket
ImportError: Module use of python34.dll conflicts with this version of Python.
.
.
.
jedi.api.exceptions.InternalError: The subprocess C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe has crashed.
For some not in my control reasons, I have to configure my environment to have the python distribution dll directory in the PYTHONPATH. This prevents python 3.6 to work properly since the _ctypes.pyd, _socket.pyd and friends found will be the ones for python 3.4.
My current interpreter is set to python 3.4.5 and is located on my D: drive. Why is VS Code using an interpreter located on the C: drive and of version 3.6.x to run jedi? I guess if I had no other interpreter installed, it would work properly. But I cannot test that since I do not have the rights to remove those installed interpreters on my C: drive.