You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2018.4.0
OS and version: Windows 10 Pro
Python version (& distribution if applicable, e.g. Anaconda): 3.6.5
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
Relevant/affected Python packages and their versions: N/A
Actual behavior
When running a Task that calls the python executable, the system-level interpreter is used instead of the copy inside the virtual environment. This obviously fails if the command depends on packages that are only installed inside the virtual environment.
E.g., running the following task, which depends on the grpcio-tools package (where the grpc_tools module lives)
C:\Python36\python.exe: Error while finding module specification for 'grpc_tools.protoc' (ModuleNotFoundError: No module named 'grpc_tools')
The terminal process terminated with exit code: 1
If I prepend pipenv run to the command everything works as expected, but I thought the Task would be smart enough to do that (or something equivalent) on its own.
Expected behavior
Tasks that call the Python interpreter should do it inside the virtual environment.
Steps to reproduce:
Create a python project with a virtual environment.
Open the project in VS Code.
Install a package (VS code will correctly install it inside the virtual environment).
Create a task that calls python and somehow uses the package installed in step 3 (for an example see section Actual behavior above )
Execute the task.
The text was updated successfully, but these errors were encountered:
This is an enhancement request.
Environment data
Actual behavior
When running a Task that calls the
python
executable, the system-level interpreter is used instead of the copy inside the virtual environment. This obviously fails if the command depends on packages that are only installed inside the virtual environment.E.g., running the following task, which depends on the
grpcio-tools
package (where thegrpc_tools
module lives)produces this output
If I prepend
pipenv run
to the command everything works as expected, but I thought the Task would be smart enough to do that (or something equivalent) on its own.Expected behavior
Tasks that call the Python interpreter should do it inside the virtual environment.
Steps to reproduce:
python
and somehow uses the package installed in step 3 (for an example see section Actual behavior above )The text was updated successfully, but these errors were encountered: