This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Documentation Fix: Remove .bat when activating venv on windows
Type: enhancement Stage: needs patch
Components: Documentation, Windows Versions: Python 3.11, Python 3.10, Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eryksun, jovinator, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: easy

Created on 2022-03-22 14:57 by jovinator, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg415783 - (view) Author: J Y (jovinator) Date: 2022-03-22 14:57

For windows, tutorial-env\Scripts\activate.bat doesn't appear to set up venv successfully. 

Instead, tutorial-env\Scripts\activate (without .bat) works. This may confuse new users if this is not rectified.
msg415794 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2022-03-22 15:44
Running `tutorial-env\Scripts\activate` should suffice. The .bat script is for CMD, and the .ps1 script is for PowerShell. The shell should run the right script without having to include the extension. 

In Windows 10+, if you use a case-sensitive directory for the virtual environment, note that the script name for PowerShell is "Activate.ps1". PowerShell 7+ checks the directory for any name that case-insensitively matches "activate", but you'll have to run `tutorial-env\Scripts\Activate` in PowerShell 5.1.
msg416002 - (view) Author: J Y (jovinator) Date: 2022-03-25 14:28
Do you think it's worth changing it to just activate and adding a footnote mentioning the variations as I've been a dev for a few years now and it stumped me for a minute as I work in a few different envs. 

Mainly thinking of making setting up venv's as easy as possible for new comers with one less roadblock on their journey.
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91249
2022-03-25 14:28:00jovinatorsetmessages: + msg416002
2022-03-22 15:44:47eryksunsetcomponents: + Windows
versions: + Python 3.9, Python 3.10
keywords: + easy
nosy: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower

messages: + msg415794
stage: needs patch
2022-03-22 14:57:34jovinatorcreate