Python .\venv\Scripts\activate.bat not work and doesn't show (.venv) flag in window terminal but work in cmd #17856

Open
opened 2026-01-31 05:56:29 +00:00 by claunia · 0 comments
Owner

Originally created by @wonkyDD on GitHub (Jul 4, 2022).

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19044.1766

Other Software

python 3.10.5

Steps to reproduce

In Window Terminal

I installed venv , named as venv, right under project directory.
image

And excuted activate.bat
image

I tried also Activate.ps1 but it just throw me error :-(

Entered, and it cleaned its page like when we type cls
image

But it doesn't show me (venv) flag like in Command Prompt

Typed same with all the things above in cmd and result below

image

There is a (venv) leftmost site diffrent from window terminal

Just In case, venv worked out but it just doesn't show (venv) in window terminal,
so I give an input pip list to check out if it works

  • In cmd

image

As virtual environment, it only showed pip and setuptools and worked well

  • In window terminal

image

Unlike in cmd, it showed all the packages I've installed using pip.
It doesn't work as virtual env :-(

What am I supposed to do? What's wrong with me?
If I forgot some details to solve this problem,
please let me know :)

Thank you for reading!

Expected Behavior

1. I want (venv) flag to show up in window terminal like in cmd

2. When I input pip list in window terminal , just want to make it give me only pip and setuptools

3. After executing .\venv\Scripts\activate.bat, when I input where.exe python , want to show me all the python paths including python in .\venv

  • In window terminal

image

  • In cmd

image

D:\dev\project\venv\Scripts\python.exe only shows up in cmd

Actual Behavior

Sorry for writing actual behavior in steps to reproduce area 🙏

Originally created by @wonkyDD on GitHub (Jul 4, 2022). ### Windows Terminal version 1.13.11431.0 ### Windows build number 10.0.19044.1766 ### Other Software python 3.10.5 ### Steps to reproduce # In `Window Terminal` I installed `venv `, named as venv, right under `project` directory. ![image](https://user-images.githubusercontent.com/81248624/177147236-63059519-894d-4c2f-85fb-8d5a1119f3f9.png) And excuted `activate.bat` ![image](https://user-images.githubusercontent.com/81248624/177147480-459e3363-a21b-4356-879c-10f97c76bff2.png) > I tried also `Activate.ps1` but it just throw me error :-( Entered, and it cleaned its page like when we type `cls` ![image](https://user-images.githubusercontent.com/81248624/177148636-f2450155-4228-497a-8f6f-2f10a246dc90.png) ## But it doesn't show me `(venv)` flag like in `Command Prompt` Typed same with all the things above in cmd and result below ![image](https://user-images.githubusercontent.com/81248624/177149338-8fb21b0b-61e8-4743-9fdf-b1900c6aa260.png) There is a `(venv)` leftmost site diffrent from `window terminal` **Just In case, venv worked out but it just doesn't show `(venv)` in window terminal,** so I give an input `pip list` to check out if it works - In `cmd` ![image](https://user-images.githubusercontent.com/81248624/177150746-4ef42142-8e2c-4423-85de-98ed93c2e0dc.png) As virtual environment, it only showed `pip` and `setuptools` and worked well - In `window terminal` ![image](https://user-images.githubusercontent.com/81248624/177151024-669a5c07-18b3-4e0e-861e-d657991bec65.png) Unlike in `cmd`, it showed all the packages I've installed using pip. It doesn't work as virtual env :-( What am I supposed to do? What's wrong with me? If I forgot some details to solve this problem, please let me know :) Thank you for reading! ### Expected Behavior ### 1. I want (venv) flag to show up in `window terminal` like in `cmd` ### 2. When I input `pip list` in `window terminal` , just want to make it give me only `pip` and `setuptools` ### 3. After executing `.\venv\Scripts\activate.bat`, when I input `where.exe python` , want to show me all the python paths including python in `.\venv` - In `window terminal` ![image](https://user-images.githubusercontent.com/81248624/177152952-adc11e86-d2bc-4dbe-9c27-7a3fcffe301e.png) - In `cmd` ![image](https://user-images.githubusercontent.com/81248624/177153122-7614cf03-64a8-4a4b-ae3b-8ce7659f0461.png) `D:\dev\project\venv\Scripts\python.exe` only shows up in `cmd` ### Actual Behavior Sorry for writing actual behavior in steps to reproduce area 🙏
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:56:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17856