GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #119078

New issue
Copy link
New issue
Copy link
Closed
Closed
venv tutorial wrong/confusing about python version used#119078
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@deuberger
deuberger
opened on May 15, 2024
Issue body actions

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

  • gh-119078: Clarify venv tutorial #119129
  • [3.12] gh-119078: Clarify venv tutorial (GH-119129) #119141
  • [3.13] gh-119078: Clarify venv tutorial (GH-119129) #119142
Reacted by Kirill Podoprigora, Charlie Zhao and Nice Zombies

Activity

  1. deuberger
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on May 15, 2024
  2. nineteendo commented on May 16, 2024

    @nineteendo
    nineteendo
    on May 16, 2024
    Contributor
    More actions

    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?

  3. deuberger commented on May 16, 2024

    @deuberger
    deuberger
    on May 16, 2024
    Author
    More actions

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

    Reacted by Nice Zombies
  4. nineteendo commented on May 16, 2024

    @nineteendo
    nineteendo
    on May 16, 2024
    Contributor
    More actions

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

  5. anushatomar13 commented on May 17, 2024

    @anushatomar13
    anushatomar13
    on May 17, 2024
    More actions

    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?

  6. nineteendo commented on May 17, 2024

    @nineteendo
    nineteendo
    on May 17, 2024
    Contributor
    More actions

    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.

  7. deuberger commented on May 17, 2024

    @deuberger
    deuberger
    on May 17, 2024
    Author
    More actions

    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.

    Reacted by Nice Zombies
  8. nineteendo commented on May 17, 2024

    @nineteendo
    nineteendo
    on May 17, 2024
    Contributor
    More actions

    Looks good, feel free to create a pull request.

  9. nineteendo commented on May 17, 2024

    @nineteendo
    nineteendo
    on May 17, 2024
    Contributor
    More actions

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

  10. vsajip
    added a commit that references this issue on May 18, 2024

    gh-119078: Clarify venv tutorial (GH-119129)

    0f5e8be
  11. miss-islington
    added 2 commits that reference this issue on May 18, 2024

    pythongh-119078: Clarify venv tutorial (pythonGH-119129)

    7176b91

    pythongh-119078: Clarify venv tutorial (pythonGH-119129)

    149924d
  12. vsajip
    added 2 commits that reference this issue on May 18, 2024

    [3.12] gh-119078: Clarify venv tutorial (GH-119129) (GH-119141)

    bb44a82

    [3.13] gh-119078: Clarify venv tutorial (GH-119129) (GH-119142)

    1bb3a9d
  13. vsajip
    closed this as completedon May 18, 2024
  14. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-119078: Clarify venv tutorial (pythonGH-119129)

    181524e
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 dirDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.