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 — Suggest the possible module in "python -m module" · Issue #145031 · python/cpython

Suggest the possible module in "python -m module" #145031

New issue
Copy link
New issue
Copy link
Open
Open
Suggest the possible module in "python -m module"#145031
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-importlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@Locked-chess-official
Locked-chess-official
opened on Feb 20, 2026
Issue body actions

Feature or enhancement

Proposal:

Now python has suggested the possible module name when ModuleNotFoundError raised. This issue is trying to make it also enable in "python -m module". The effect is like:

❯ python -m randon
/Library/Frameworks/Python.framework/Versions/3.14/bin/python3: No module named 'randon'. Did you mean: 'random'?

Changing "runpy.py" can make it.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-145031: suggest the module in "python -m module" #145096
Reacted by An Long

Activity

  1. Locked-chess-official
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Feb 20, 2026
  2. StanFromIreland
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Feb 20, 2026
  3. sharktide commented on Feb 20, 2026

    @sharktide
    sharktide
    on Feb 20, 2026
    Contributor
    More actions

    If no other information is given (eg. someone just types python -m module, how can we reliably determine the module they are looking for? Or do we just print out all the modules to stdout

  4. Locked-chess-official commented on Feb 20, 2026

    @Locked-chess-official
    Locked-chess-official
    on Feb 20, 2026
    ContributorAuthor
    More actions

    If no other information is given (eg. someone just types python -m module, how can we reliably determine the module they are looking for? Or do we just print out all the modules to stdout

    There is no needed to do that. Just using the way like #142512. Only one possible module will be printed in stderr.

  5. serhiy-storchaka
    added
    topic-importlib
    on Jul 3, 2026
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

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-importlibtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — 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.