Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${config:python.interpreterPath} cannot be used in settings.json or task.json #11789

Closed
karthiknadig opened this issue May 13, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@karthiknadig
Copy link
Member

karthiknadig commented May 13, 2020

You get the following error:

'${config:python.interpreterPath}' can not be resolved because setting 'python.interpreterPath' not found.

This is need to completely replace ${config:python.pythonPath}.

https://code.visualstudio.com/docs/editor/tasks#_variable-substitution

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels May 13, 2020
@karthiknadig karthiknadig added the needs spike Label for issues that need investigation before they can be worked on. label May 13, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 13, 2020
@karthiknadig karthiknadig added the important Issue identified as high-priority label May 13, 2020
@karthiknadig karthiknadig changed the title ${config:python.interpreterPath} cannot be used in settings.json ${config:python.interpreterPath} cannot be used in settings.json or task.json May 13, 2020
@karthiknadig
Copy link
Member Author

karthiknadig commented May 13, 2020

/cc @jahan01 @karrtikr Lets continue the conversation on the interpreterPath issue here.

@jahan01
Copy link

jahan01 commented May 14, 2020

@jahan01 @karthiknadig We can only use ${config:python.interpreterPath} in launch.json. Can you paste that part of tasks.json where you use ${config:python.pythonPath}? What happens if you don't specify the python path at all.

@karrtikr: Below is my prelaunch task for one of my launch.json debug config.

task.json:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Prepare env",
            "type": "shell",
            "command": "${config:python.pythonPath}",
            //"command": "${config:python.interpreterPath}",
            "args": [
                "${workspaceFolder}/prepare_env.py",
            ],
        },
}

@karrtikr
Copy link

karrtikr commented May 20, 2020

Should be resolved in the next release. Use ${command:python.interpreterPath} to get the value.

@ghost ghost removed the needs spike Label for issues that need investigation before they can be worked on. label May 20, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

3 participants