python-poetry / python-poetry/install.python-poetry.org
[Doc] Add PowerShell snippet in the installation instructions (web & scripts) to allow Windows users to modify `%PATH%` easier
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 255
- Forks
- 65
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 1
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
https://python-poetry.org/docs/master/#installing-with-the-official-installer
Add Poetry to your PATH
The installer creates a
poetrywrapper in a well-known, platform-specific directory:
$HOME/.local/binon Unix.%APPDATA%\Python\Scriptson Windows.If this directory is not present in your $PATH, you can add it in order to invoke Poetry as
poetry.Alternatively, the full path to the
poetrybinary can always be used:
$POETRY_HOME/bin/poetryif$POETRY_HOMEis set.~/Library/Application Support/pypoetry/bin/poetryon MacOS.~/.local/share/pypoetry/bin/poetryon Linux/Unix.%APPDATA%\pypoetry\Scripts\poetryon Windows.
The following snippet is helpful and should be appended in the document for Windows users:
if (-not (Get-Command poetry -ErrorAction Ignore)) { [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$env:APPDATA\Python\Scripts", "User") }
or (for PowerShell 6+)
if (-not (Get-Command poetry -ErrorAction Ignore)) { echo 'if (-not (Get-Command poetry -ErrorAction Ignore)) { $env:Path += ";$env:APPDATA\Python\Scripts" }' | Out-File -Append $PROFILE }
P.S. The script provided by https://install.python-poetry.org also needs this fix.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the installation instructions at the linked official-installer documentation section and inspect the installer script provided by install.python-poetry.org. Compare the Windows PATH guidance for standard PowerShell and PowerShell 6+, then verify that both the documentation and script address the reported Windows setup case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, python
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100