pypa / pypa/packaging.python.org
More accurate guidance: what is the meaning of "you're in your virtual environment" ?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 1.7k
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Hi,
As a newbie, I would like to read more accurate descriptions.
e.g.
"Installing packages
Now that you're in your virtual environment you can install packages. Let's install the Requests library from the :term:Python Package Index (PyPI):
"
- Does this mean that
a) the command shell's current directory needs to be set to the virtual environment's directory (if yes: exactly which directory?)
or
b) the meaning is that kind of I've been logged in to this virtual environment (and doesn't matter where the current directory is, even it can be changed to any other virtual environment's directory) and the commands are served/ran by the bins in the activated virtual environment?
n.b. 'logged in' is quite an abstract phrase here - meaning something like locked, bound, activated - still learning the phrases :-)
---edit---
I found this
https://docs.python.org/3/library/venv.html#module-venv
"You don’t specifically need to activate an environment; activation just prepends the virtual environment’s binary directory to your path, so that “python” invokes the virtual environment’s Python interpreter and you can run installed scripts without having to use their full path. However, all scripts installed in a virtual environment should be runnable without activating it, and run with the virtual environment’s Python automatically.
"
- So, an activated virtual environment is not something like logged in, as far as I understand actually it's something very weak, it's a temporal change of PATH (until deactivate is run)
Also, a description (diagram, maybe) of the process/flow of activating-using-deactivating virtual environments would shed light here, e.g. what is changed under the hood, what variables are affected, how a command and its path is interpreted. Maybe that belongs to another topic.
Thanks!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem im Issue zitierten Abschnitt „Installing packages“ und vergleiche seine Formulierung mit der venv-Dokumentation von Python unter der verlinkten URL. Kläre, was die Aktivierung ändert, wie das aktuelle Verzeichnis mit der Umgebung zusammenhängt und ob ein Diagramm in dieses Thema gehört; als erledigt gilt die Aufgabe, wenn ein Neuling den Ablauf von Aktivierung, Verwendung und Deaktivierung verstehen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100