Skip to content

fix(aws-cdk): document PowerShell virtualenv activation in python templates - #2015

Open
reginaldalfret wants to merge 1 commit into
aws:mainfrom
reginaldalfret:fix/issue-1984-python-template-powershell
Open

reginaldalfret wants to merge 1 commit into
aws:mainfrom
reginaldalfret:fix/issue-1984-python-template-powershell

Conversation

@reginaldalfret

Copy link
Copy Markdown

Description

This PR updates the Python app and sample-app init template READMEs (packages/aws-cdk/lib/init-templates/app/python/README.template.md and packages/aws-cdk/lib/init-templates/sample-app/python/README.template.md) to document the virtualenv activation command for PowerShell (.\.venv\Scripts\Activate.ps1) alongside the existing cmd.exe command (.venv\Scripts\activate.bat).

Motivation

Closes #1984

On Windows, executing a .bat file from PowerShell spawns a separate cmd subshell, which terminates immediately without propagating the virtual environment variables to the parent PowerShell session. Because PowerShell is the default terminal on Windows 11 and inside VS Code, documenting the PowerShell activation script ensures Windows PowerShell users can properly activate the project's virtual environment.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

…hon templates

Running a .bat file from PowerShell spawns a separate cmd process, meaning environment changes do not persist in the calling shell.

Documenting the PowerShell activation script alongside the cmd script ensures users on PowerShell can activate the virtualenv properly.

Fixes aws#1984

Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
@aws-cdk-automation
aws-cdk-automation requested a review from a team October 2, 2026 18:50
@reginaldalfret reginaldalfret changed the title fix(init-templates): document PowerShell virtualenv activation in python templates fix(aws-cdk): document PowerShell virtualenv activation in python templates Oct 2, 2026

This branch is waiting to be deployed

1 inactive and 1 waiting deployments
integ-approval — dcd3a5c4 Waiting Oct 2, 2026 by reginaldalfret via prepare #7065
automation — dcd3a5c4 Deployed Oct 2, 2026 by reginaldalfret via Set AutoQueue on PR #2015 #3674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(init-templates): python README only documents cmd activation, not PowerShell

1 participant