GeezerVison is showing github.com — venv tutorial wrong/confusing about python version used · Issue #119078 · python/cpython
venv tutorial wrong/confusing about python version used #119078DescriptionDocumentation
From https://docs.python.org/3/tutorial/venv.html:
venv will usually install the most recent version of Python that you have available. If you have multiple versions of Python on your system, you can select a specific Python version by running python3 or whichever version you want.
https://docs.python.org/3/library/venv.html#module-venv though makes it clear that the venv will use the Python installation from which the command was run.
So I believe it should be updated to:
venv will install the Python version from which the command was run. If you have multiple versions of Python on your system, you can select a specific Python version by running python3 or whichever version you want.
Linked PRs
Reacted by Kirill Podoprigora, Charlie Zhao and Nice Zombies Activitynineteendo commented on May 16, 2024
If you have multiple versions of Python on your system, you can select a specific Python version by running python3 or whichever version you want.
Isn't this a bit redundant then? deuberger commented on May 16, 2024 @nineteendo I wondered about that and I think yes it is partially redundant, but not entirely. How about:
venv will install the Python version from which the command was run. For instance, running python3.8 will install version 3.8 specifically whereas running just python or python3 might install any number of versions. See the Python Setup and Usage documentation for additional details.
I'd be fine reducing it to just the first sentence as well, but new users may find the additional information helpful. nineteendo commented on May 16, 2024 How about mentioning python -V? As it tells you which version will be installed. Or python --version anushatomar13 commented on May 17, 2024 Hi @nineteendo ,
Have you reached a final conclusion on this issue yet?
If yes, can I take up this issue and start working on it? nineteendo commented on May 17, 2024 I think this should be clear enough:
venv will install the Python version shown for --version. For instance, excuting the command with python3.8 will install version 3.8.
deuberger commented on May 17, 2024 Sorry, for the slow response. I thought of adding --version too, but thought it might be too much with what I had before. I like the suggestion from @nineteendo, but also propose the below slightly more verbose option that might add a little more clarity:
venv will install the Python version from which the command was run (as reported by the --version option). For instance, excuting the command with python3.8 will install version 3.8.
nineteendo commented on May 17, 2024 Looks good, feel free to create a pull request. nineteendo commented on May 17, 2024 Although, it might be more relevant to mention 3.12 or 3.13?
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|