user1767754
user1767754

Reputation: 25154

VSCode "Python: Select interpreter" add a custom path

I'm trying to run a python executable that is a plugin to an application (Unreal Engine). When I do CTRL + ALT + P and do select python interpreter it only shows me the system installed python interpreter and the virtual envs. How can I add a searchpath?

Upvotes: 3

Views: 6483

Answers (2)

amirh_far
amirh_far

Reputation: 81

As Vscode updated, the setting name changed to:

{
    "python.defaultInterpreterPath": "/path/to/your/interpreter/python"
}

Upvotes: 1

Gino Mempin
Gino Mempin

Reputation: 29660

You can add a python.pythonPath setting in the settings.json file of your workspace.

From Manually specify an interpreter:

If VS Code does not automatically locate an interpreter you want to use, you can set the path to it manually in your Workspace Settings settings.json file. With any of the entries that follow, you can just add the line as a sibling to other existing settings.)

For example, in your workspace's .vscode/settings.json:

{
    "python.pythonPath": "/path/to/your/custom/python"
}

I recommend reloading VS Code after setting the pythonPath. If it works, every time you open the workspace, it will automatically use that Python interpreter.

Upvotes: 6

Related Questions