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
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 255
- Forks
- 65
- Merge moyen
- 2 h 48 min
- PR mergées (30 j)
- 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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par les instructions d’installation de la section liée de la documentation official-installer et examinez le script d’installation fourni par install.python-poetry.org. Comparez les indications concernant le PATH de Windows pour PowerShell standard et PowerShell 6+, puis vérifiez que la documentation et le script traitent tous deux le cas de configuration Windows signalé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell, python
- Domaine
- cli, documentation
- Type d'issue
- Documentation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100