Visitar URL original
venv tutorial wrong/confusing about python version used · Issue #119078 · python/cpython · GitHub
Skip to content

venv tutorial wrong/confusing about python version used #119078

Description

@deuberger

Documentation

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

Activity

  1. nineteendo commented on May 16, 2024

    @nineteendo
    Contributor

    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?

  2. deuberger commented on May 16, 2024

    @deuberger
    Author

    @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.

  3. nineteendo commented on May 16, 2024

    @nineteendo
    Contributor

    How about mentioning python -V? As it tells you which version will be installed. Or python --version

  4. anushatomar13 commented on May 17, 2024

    @anushatomar13

    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?

  5. nineteendo commented on May 17, 2024

    @nineteendo
    Contributor

    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.

  6. deuberger commented on May 17, 2024

    @deuberger
    Author

    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.

  7. nineteendo commented on May 17, 2024

    @nineteendo
    Contributor

    Looks good, feel free to create a pull request.

  8. nineteendo commented on May 17, 2024

    @nineteendo
    Contributor

    Although, it might be more relevant to mention 3.12 or 3.13?

  9. added a commit that references this issue on May 18, 2024
  10. added 2 commits that reference this issue on May 18, 2024
  11. added 2 commits that reference this issue on May 18, 2024
  12. added a commit that references this issue on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions