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

Offen
#66 3 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
255
Forks
65
Ø Merge
2 Std. 48 Min.
Gemergte PRs (30 T.)
1

Beschreibung

  • 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 poetry wrapper in a well-known, platform-specific directory:

  • $HOME/.local/bin on Unix.
  • %APPDATA%\Python\Scripts on 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 poetry binary can always be used:

  • $POETRY_HOME/bin/poetry if $POETRY_HOME is set.
  • ~/Library/Application Support/pypoetry/bin/poetry on MacOS.
  • ~/.local/share/pypoetry/bin/poetry on Linux/Unix.
  • %APPDATA%\pypoetry\Scripts\poetry on 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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie mit den Installationsanweisungen im verlinkten Abschnitt der official-installer-Dokumentation und untersuchen Sie das von install.python-poetry.org bereitgestellte Installationsskript. Vergleichen Sie die Windows-PATH-Anleitungen für standardmäßiges PowerShell und PowerShell 6+, und überprüfen Sie anschließend, dass sowohl die Dokumentation als auch das Skript den gemeldeten Windows-Einrichtungsfall abdecken.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, python
Bereich
cli, documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.