Skip to content

When python.pythonPath includes ${workspaceFolder}, tasks that use ${config:python.pythonPath} fail to start #57551

@brettcannon

Description

@brettcannon

From @segevfiner on August 28, 2018 22:39

Environment data

  • VS Code version: 1.26.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Windows 10.0.17134.228 x64
  • Python version (& distribution if applicable, e.g. Anaconda): CPython 3.7.0 x64
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv

Actual behavior

When python.pythonPath includes ${workspaceFolder}, tasks that use ${config:python.pythonPath} fail to start:

> Executing task: ${workspaceFolder}\venv\Scripts\python.exe setup.py build_ext --inplace <

The system cannot find the path specified.
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

Expected behavior

The tasks should start correctly. It's quite useful to use ${config:python.pythonPath} in your tasks so as to use the Python version used by vscode-python to run the tasks.

Steps to reproduce:

  1. Create a virtualenv under your workspace: virtualenv venv
  2. Select it as the Python interpreter of VS Code using the status bar. (python.pythonPath should be set to a path using ${workspaceFolder}).
  3. Create a task that uses ${config:python.pythonPath} to run anything you want, and try to run it.

Logs

Nothing relevant under default log level.

Copied from original issue: microsoft/vscode-python#2459

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitytasksTask system issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions