[issue47093] Documentation Fix: Remove .bat when activating venv on windows
New submission from J Y <jovinator77@gmail.com>: https://docs.python.org/3/tutorial/venv.html 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. ---------- assignee: docs@python components: Documentation messages: 415783 nosy: docs@python, jovinator priority: normal severity: normal status: open title: Documentation Fix: Remove .bat when activating venv on windows type: enhancement versions: Python 3.11 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47093> _______________________________________
Eryk Sun <eryksun@gmail.com> added the comment: 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. ---------- components: +Windows keywords: +easy nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47093> _______________________________________
J Y <jovinator77@gmail.com> added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47093> _______________________________________
participants (2)
-
Eryk Sun
-
J Y