Skip to content

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

@Locked-chess-official

Description

@Locked-chess-official

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions