pythonvisual-studio-codepex

Using python pex as interpreter doesn't work


I have a python pex file that I want to use as a python interpreter. I set the .pex in vscode as python interpreter and vscode recognized it correctly as python interpreter, but when I click on run, it doesn't do anything. There is no debug or output print anywhere that I can see. The same pex file works fine from command line.


Solution

  • The vscode python interpreter only supports the recognition of python.exe. The content you mentioned is provided by the pex package which is not a VsCode built-in package, and VsCode itself does not support it at present.

    Currently, vscode supports the recognition of conda and venv in virtual environment.

    You can read document for more details.