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'?
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
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.
Activity
sharktide commented on Feb 20, 2026
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
Locked-chess-official commented on Feb 20, 2026
There is no needed to do that. Just using the way like #142512. Only one possible module will be printed in stderr.