-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Virtual env not activated in tasks #22880
Comments
Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience! |
It's true that I didn't enter the virtual environment, which is very annoying. |
@umnovI
Output for
|
@karrtikr sure. log
|
@umnovI You seem to be using an older version of Python extension, can you try pre-release? |
@karrtikr Here log
|
Thanks, now logs seems to indicate it's pre-release. Can you provide screenshots for the following?
|
Those commands are for cmd tho:
pwsh
|
Environment seems to be activating correctly for you on powershell, can you run the failing task command there and report the output? |
It seems the issue is that your Task is using cmd, instead of powershell which is why it's failing, can you configure it to use Powershell? We should ideally activate all terminal types, but unfortunately due to a limitation on VS Code, it is not the case atm. |
My bad, you're right. Can you try the adding the following the User setting, reload and report back if it works?
|
Gotcha. It seems to me that activating environments via task was never "officially" supported. It was supported for a brief moment in November-December inadvertently, but the fix was removed. Let me know if you disagree. I'll talk to the team regarding what are the future steps here. |
I've had everything in tasks. From server start to coverage run 😨 |
@umnovI We'll require some support from VS Code to support it reliably, I've mentioned it here: microsoft/vscode#204694 (comment). |
@karrtikr thanks! |
Closing in favor of microsoft/vscode#205177. |
Type: Bug
Behaviour
Expected vs. Actual
It should activate the selected virtual env before running a task.
But it doesn't activate.
Steps to reproduce:
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2024.0.1
VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:27:46.147Z)
OS version: Linux x64 5.4.0-171-generic
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: disabled_off
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: